lay_grid: Use Layout object with grid graphics.

Description Usage Arguments Value Examples

View source: R/Layout.R

Description

Use Layout object with grid graphics.

Usage

1
2
3
lay_grid(grobs, lay, ...)

layGrid(grobs, lay, ...)

Arguments

grobs

list of grobs.

lay

a Layout object.

...

other parameters passed to grid.arrange.

Value

gtable object containing multiple graphs. See grid.arrange.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(ggplot2)

l1 <- lay_new(matrix(1:2, ncol = 1), heights = c(2, 3))
l2 <- lay_new(matrix(1:2, ncol = 1), heights = c(1, 3))
l3 <- lay_bind_col(l1, l2)

pl1 <- qplot(mpg, wt, data = mtcars)
pl2 <- qplot(mpg, gear, data = mtcars)
pl3 <- qplot(cyl, gear, data = mtcars)
pl4 <- qplot(qsec, am, data = mtcars)

lay_grid(list(pl1, pl2, pl3, pl4), l3)

zzawadz/customLayout documentation built on June 9, 2021, 11:10 a.m.