Learn R Programming

wq (version 0.4-1)

layOut: Arrange a group of saved plots

Description

Lays out plots on a grid, with flexible choice of the relative dimensions for each plot. Individual plots must be objects of class "ggplot".

Usage

layOut(...)

Arguments

Value

A graph containing all the given plots.

Rdversion

1.1

Details

The position of each plot is determined by the beginning row and column numbers. The relative size of each plot is determined by the sequence lengths of row and column numbers. The total grid size of the graph is determined automatically by the grid numbers used for individual plots. Some manual adjustment of the graphics window may be necessary to get proper aspect ratios and prevent text from overlapping.

Examples

Run this code
chl27 = sfbayChla[, 's27']
g1 <- plotTsTile(chl27, legend.title = 'Chl log-anomaly',
    square=FALSE)
g2 <- seasonTrend(chl27, plot = TRUE, legend = TRUE)
g3 <- plotSeason(chl27, num.era = 3,
    ylab = expression(paste('Chl-', italic(a), ', ', mu*g~L^{-1})))
## quartz("", 10, 6)  # e.g., in mac os x, or:
## grid.newpage()  # to re-use existing plot window
layOut(list(g1, 1:2, 1:6), list(g2, 1:2, 7:10), list(g3, 3:5, 1:8))

Run the code above in your browser using DataLab