splitplot | R Documentation |
Uses the plt
argument of the par
function to divide the space
according to the input grid.
splitplot(nrows, ncols, i=1, new=as.logical(i > 1 && i <= nrows*ncols), gap=0.15)
nrows |
an integer defining the number of desired rows in the plot grid. |
ncols |
an integer defining the number of desired column in the plot grid. |
gap |
a numeric scalar used a nudge factor for the gap between plots in both the
x- and y-directions. Default: |
i |
selects the |
new |
a logical flag. If |
the original plt
value of the par
function prior to the call.
The user can use this to reset plt
to its original values.
The plt
option of the par
function is altered.
stackPlot
.
## establish a 2x2 plot grid and select the first ## for plotting old.plt <- splitplot(2,2,1) ## plot the data for (i in seq(4)){ if (i > 1) splitplot(2,2,i) plot(rnorm(100)*i) mtext(paste("i=", i, sep=""), side=3, line=0.5) } ## return the original plot state of plt in par par(old.plt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.