#############
### Small example
traj1 <- gald()
part1 <- partition(rep(LETTERS[1:4],each=50),nbClusters=4)
### Several way to print the longData
par(ask=TRUE)
plot(traj1)
plot(traj1,part1)
### Only the longData, in black
plot(traj1,part1,type.mean="n", col=1)
### Only the clusters centers
plot(traj1,part1,type="n")
### only the clusters centers, in black with no letters
plot(traj1,part1,type="n",col.mean="black",type.mean="l")
### Big letter, in black (for publication...)
plot(traj1,part1,type="n",col.mean="black",cex.mean=2)
#############
### Big example
traj2 <- gald(time=0:500,functionClusters=list(
function(t){5},
function(t){-5},
function(t){5*sin(t/25)}
))
part2 <- partition(rep(LETTERS[1:3],each=50),nbClusters=3)
plot(traj2,part2)
### Only the clusters mean
plot(traj2,part2,type="n")
### With not as much letters...
plot(traj2,part2,pch.time=25+0:9*50,cex=2,type="n")
par(ask=FALSE)
Run the code above in your browser using DataLab