Learn R Programming

kml3d (version 0.7)

parWindows: ~ Function: parWindows ~

Description

parWindows is the constructor of object ParWindows.

Usage

parWindows(nbCol, nbRow, addLegend,closeScreen)

Arguments

nbCol
[numeric]: Number of column of the screen matrix.
nbRow
[numeric]: Number of row of the screen matrix.
addLegend
[logical]: Shall a legend be added on the graph?
closeScreen
[logical]: Some function (like choice) need to add details on a graph. This option let them call a plot function that will not call a close.screen on exit, so the gra

Value

  • An object of class ParWindows.

Author(s)

Christophe Genolini INSERM U669 / PSIGIAM: Paris Sud Innovation Group in Adolescent Mental Health Modal'X / Universite Paris Ouest-Nanterre- La Defense Contact author : genolini@u-paris10.fr

Details

parWindows is the constructor of object ParWindows. Given a number of rows and colonnes, it computes the screenMatrix that is use by split.screen for plot object ClusterLongData. If addLegend is true, an extra space is added on the top of the graphes to print the legend.

References

Article "KmL: K-means for Longitudinal Data", in Computational Statistics, Volume 25, Issue 2 (2010), Page 317. Web site: http://christophe.genolini.free.fr/kml

Examples

Run this code
### Building ParWindows
(paramWin <- parWindows(3,2,FALSE,TRUE))

### Get
figsScreen <- paramWin['screenMatrix']

### Usage
listScreen <- split.screen(figsScreen)
screen(listScreen[1])
plot(-5:5/10,2.5-(-5:5)^2/20,ylim=c(0,6),axes=FALSE,xlab="",ylab="",type="l",lwd=3)
lines(-5:5/10,(-5:5)^2/20,ylim=c(0,6),type="l",lwd=3)

screen(listScreen[3])
plot(-5:5/10,2.5-(-5:5)^2/20,ylim=c(0,6),axes=FALSE,xlab="",ylab="",type="l",lwd=3)
lines(-5:5/10,(-5:5)^2/20,ylim=c(0,6),type="l",lwd=3)

screen(listScreen[5])
plot(-5:5/10,(-5:5)^2/10,ylim=c(0,6),axes=FALSE,xlab="",ylab="",type="l",lwd=3)
lines(-5:5/10,(-5:5)^2/20+1.25,ylim=c(0,6),type="l",lwd=3)
close.screen(all.screens=TRUE)

### :-)

Run the code above in your browser using DataLab