gridExtra (version 0.9.1)

marrangeGrob: marrangeGrob

Description

Interface to arrangeGrob that can dispatch on multiple pages

Usage

marrangeGrob(..., as.table = FALSE, clip = TRUE,
    top = quote(paste("page", g, "of", pages)),
    bottom = NULL, left = NULL, right = NULL)

Arguments

...
grobs
as.table
clip
bottom
left
right

Value

  • a list of class arrangelist

Details

If the layout specifies both nrow and ncol, the list of grobs can be split in multiple pages. Interactive devices print open new windows, whilst non-interactive devices such as pdf call grid.newpage() between the drawings.

Examples

Run this code
require(ggplot2)
pl <- lapply(1:11, function(.x) qplot(1:10,rnorm(10), main=paste("plot",.x)))
ml <- do.call(marrangeGrob, c(pl, list(nrow=2, ncol=2)))
## interactive use; open new devices
ml
## non-interactive use, multipage pdf
ggsave("multipage.pdf", ml)

Run the code above in your browser using DataCamp Workspace