Learn R Programming

kml3d (version 2.3)

plot,ClusterLongData3d: ~ Function: plot for ClusterLongData3d ~

Description

plot the trajectories of an object ClusterLongData3d relativly to a Partition. One graphe for each variable is displayed.

Usage

## S3 method for class 'ClusterLongData3d,numeric':
plot(x,y,parTraj=parTRAJ(),parMean=parMEAN(),
   parWin=windowsCut(x['nbVar']),nbSample=200,toPlot=c("both"),nbCriterion=100,...)

Arguments

x
[ClusterLongData3d]: Object containing the joint-trajectories to plot.
y
[numeric] or [vector2(numeric)]: Give the Partition to represent. If y is missing, the Partition with the highest quality criterion (the actif one) is selected. If y i
parTraj
[ParLongData]: Specification of the plotting parameters of the individual trajectories. Fields that can be changes are 'type','col','pch','xlab' and 'ylab'. In addition to the standard possible values, the option col="clu
parMean
[ParLongData]: Specification of the plotting parameters of the mean trajectories (only when y is non missing). Fields that can be changes are 'type','col','pch','pchPeriod' and 'cex'. See ParLongData
parWin
[parWindin]: Set the graphical display of the windows. See ParWindows for details.
nbSample
[numeric]: Graphical display of huge sample can be time consumming. This parameters fixe the maximum number of trajectories (randomly chosen) that will be drawn.
toPlot
[character]: either 'traj' for plotting trajectories alone, 'criterion' for plotting criterion alone, 'both' for plotting both or 'none' for not display anything.
nbCriterion
[numeric]: if a single criterion is given to criterion (and thus is displayed for 'all' the Partition), this slot alows to fix a limit on the number of points that will be display.
...
Arguments to be passed to methods, such as graphical parameters.

Details

plot the trajectories of an object ClusterLongData3d relativly to the 'best' Partition, or to the Partition define by y. Graphical option concerning the individual trajectory (col, type, pch and xlab) can be change using parTraj. Graphical option concerning the cluster mean trajectory (col, type, pch, pchPeriod and cex) can be change using parMean. For more detail on parTraj and parMean, see object of class ParLongData.

See Also

Overview: kml3d-package Classes : ClusterLongData3d Plot : plotTraj, plotCriterion

Examples

Run this code
##################
### Construction of the data

myCld <- gald3d()
part <- partition(rep(1:3,each=50))

### Basic plotting
plot(myCld)
plot(myCld,part)


##################
### Changing graphical parameters 'par'

### No letters on the mean trajectories
plot(myCld,part,parMean=parMEAN(type="l"))

### Only one letter on the mean trajectories
plot(myCld,part,parMean=parMEAN(pchPeriod=Inf))

### Color individual according to its clusters (col="clusters")
plot(myCld,part,parTraj=parTRAJ(col="clusters"))

### Mean without individual
plot(myCld,part,parTraj=parTRAJ(type="n"))


### No mean trajectories (type="n")
### Color individual according to its clusters (col="clusters")
plot(myCld,part,parTraj=parTRAJ(col="clusters"),parMean=parMEAN(type="n"))

### Only few trajectories
plot(myCld,part,nbSample=10,parTraj=parTRAJ(col='clusters'),parMean=parMEAN(type="n"))

Run the code above in your browser using DataLab