~ Function: plotTraj3d for ClusterLongData3d ~
Plot the trajectories of two variables of a ClusterLongData3d
object in 3D
relatively to a Partition
.
## S4 method for signature 'ClusterLongData3d,numeric' plotTraj3d(x,y,varY=1,varZ=2, parTraj=parTRAJ(col="clusters"),parMean=parMEAN(type="n"),...)
x |
|
y |
|
varY |
|
varZ |
|
parTraj |
|
parMean |
|
... |
Arguments to be passed to methods, such as graphical parameters. |
Plot the means trajectories of two variables of a ClusterLongData3d
object in 3D. It
use the rgl
library. The user can make the
graphical representation turn using its mouse.
################## ### Real example on array time=c(1,2,3,4,8,12,16,20) id2=1:120 f <- function(id,t)((id-1)%%3-1) * t g <- function(id,t)(id%%2+1)*t h <- function(id,t)(id%%4-0.5)*(20-t) myCld <- clusterLongData3d(array(cbind(outer(id2,time,f),outer(id2,time,g), outer(id2,time,h))+rnorm(120*8*3,0,3),dim=c(120,8,3))) kml3d(myCld,3:4,2) ### Basic plot plotMeans3d(myCld,3) ### plotTraj3d, variable 1 and 3 plotMeans3d(myCld,4,varZ=3) plotMeans3d(myCld,3,parMean=parMEAN(col="red"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.