From: <cgenolin_at_u-paris10.fr>

Date: Tue, 20 May 2008 22:19:16 +0200

var2[length(time),length(var1)] <- max(x[,,2],na.rm=TRUE) nbLines<-min(100,dim(x)[1])

if(missing(color)){color<-2:(nbLines+1)}else{} repeat{

}

}

plot3Dlines(data)

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 20 May 2008 - 20:38:27 GMT

Date: Tue, 20 May 2008 22:19:16 +0200

If it does not exists and I have to use my own function : 2) Is it possible to use the time wasted in delais for some calculous ? In other word, can I run some calculous during a certain amount of time, then drawing a plot, then calculous then plot...

3) Is there a way to end the rotation less violant than Esc ?

Thanks for your help.

Here is my code :

- 8< --------------------------- data <- array(c(13,14,13,15, 14,15,16,15, 16,17,16,18 , 45,46,85,59, 43,58,70,56, 45,75,65,65), dim=c(4,3,2),dimnames=c("id","temps","var"))

plot3Dlines <- function(x,y,mean=TRUE,angle=20,delais=100000,color,...){

time <- 1:dim(x)[[2]] var1 <- seq(min(x[,,1],na.rm=TRUE),max(x[,,1],na.rm=TRUE),length.out=11) var2 <- matrix(NA,length(time),length(var1))#outer(x, y, NA)var2[1,1] <- min(x[,,2],na.rm=TRUE)

var2[length(time),length(var1)] <- max(x[,,2],na.rm=TRUE) nbLines<-min(100,dim(x)[1])

if(missing(color)){color<-2:(nbLines+1)}else{} repeat{

res <- persp(x=time, y=var1, z=var2, theta = angle, phi = 10, expand = 0.5, col = "lightblue", ltheta = 120, shade = 0.75, ticktype = "detailed", xlab = "time", ylab = "var1", zlab = "var2") angle <- angle+1 for(i in 1:nbLines){ yy=x[i,,1] zz=x[i,,2] lines (trans3d(time, yy, zz, pmat = res),col=color[i]) } for(k in 1:delais){}

}

}

plot3Dlines(data)

Thanks

Christophe

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 20 May 2008 - 20:38:27 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Tue 20 May 2008 - 21:30:59 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*