LongData
relativly
to a Partition
. This function can plot the individual trajectories,
the mean trajectories or both.plotSubGroups(x, y, ...)
[Partition]
: Give the Partition
used to color the individual trajectories. If y
is missing, a
Partition
with a single cluster is considered.plot
). For LongData
object specificly :
[vector(character)]
: which subGroups of
the Partition
should be ploted ? By LongData
relativly
to a Partition
. This function can plot the individual trajectories,
the mean trajectories or both.
Some graphical parameters are available
twice, once for the individual trajectories (like type
or col
), once for the
mean trajectories (like type.mean
or col.mean
).LongData
,plot(LongData)
#############
### Building data
ld <- gald()
par(ask=TRUE)
### Default ploting
plotSubGroups(ld)
### Only the trajectories in black
plotSubGroups(ld,col=1,type.mean="n")
### Plot according to a partition
### (regular plot, then plotSubGroups
part <- partition(clusters=rep(LETTERS[1:4],each=50),nbClusters=4)
plot(ld,part,type.mean="n")
plotSubGroups(ld,part,type.mean="n")
### Only the mean trajectories, with letters (for publication ?)
plotSubGroups(ld,part,type="n",col.mean=1,size=2)
### All at once.
plotSubGroups(ld,part)
par(ask=FALSE)
Run the code above in your browser using DataLab