Learn R Programming

metaplot (version 0.2.1)

multiplot: Arrange Multiple Plots in a Grid

Description

Arranges mutiple trellis plots in a grid, automatically choosing number of rows and columns. By default, number of rows is one less than or equal to the number of columns.

Usage

multiplot(..., nrow = NULL, ncol = NULL)

Arguments

...

trellis objects

nrow

number of rows of plots

ncol

number of columns of plots

Examples

Run this code
# NOT RUN {
library(lattice)
a <- xyplot(
conc ~ Time,
xlab=NULL,
ylab = NULL,
Theoph,
aspect = 1,
scales=list(draw=FALSE)
)
multiplot(a,a,a,a,a,a)
multiplot(a,a,a,a,a,a,a)
multiplot(a,a,a,a,a,a,a,a)
multiplot(a,a,a,a,a,a,a,a,a)
multiplot(a,a,a,a,a,a,a,a,a,a)
multiplot(a,a,a,a,a,a,a,a, nrow = 2)
multiplot(a,a,a,a,a,a,a,a, ncol = 4)
multiplot(a,a,a,a,a,a,a,a, ncol = 2)
multiplot(a,a,a,a,a,a,a,a, ncol = 4, nrow = 3)
# }

Run the code above in your browser using DataLab