[R-SIG-Finance] [R-sig-finance] Multivariate TS plot with RGL

megh megh700004 at yahoo.com
Mon Sep 14 14:11:31 CEST 2009


Hi,

I have following surface plot of a multivariate time series

library(zoo); library(rgl); library(xts)
mat <- matrix(nrow=250, ncol=10)
for (i in 1:250) mat[i,] <- rnorm(1, 100, 10) + seq(10:19)
Z <- zooreg(mat, start=as.Date("2000-01-01"))

time.axis <- axTicksByTime(Z); col=c("yellow","red")
yred <- colorRampPalette(col); col1 =
rep(rep(yred(NCOL(Z)),each=1),each=(NROW(Z)-1))
Z1 <- coredata(Z)

persp3d(z=Z1,x=(1:NROW(Z1)), y=(1:NCOL(Z1)),aspect=c(1, 1, 0.5), col = col1)


Now I want to show the dates along the x-axis. Can anyone please help me how
to do that? I am specially interested to do it in RGL device.

Thanks
-- 
View this message in context: http://www.nabble.com/Multivariate-TS-plot-with-RGL-tp25434691p25434691.html
Sent from the Rmetrics mailing list archive at Nabble.com.



More information about the R-SIG-Finance mailing list