Description Usage Arguments Value Examples
View source: R/expose_layout.r
Schematic view of a ggplot object's layout.
1 | expose_layout(p, draw = TRUE, newpage = TRUE)
|
p |
ggplot |
draw |
logical, draw the gtable |
newpage |
logical |
gtable
1 2 3 4 5 6 7 8 9 | p1 <- qplot(mpg, wt, data=mtcars, colour=cyl)
p2 <- qplot(mpg, data = mtcars) + ggtitle('title')
p3 <- qplot(mpg, data = mtcars, geom = 'dotplot')
p4 <- p1 + facet_wrap(~carb, nrow=1) + theme(legend.position='none') +
ggtitle('facetted plot')
pl <- lapply(list(p1,p2, p3, p4), expose_layout, FALSE, FALSE)
grid.arrange(grobs=pl, widths=c(1.2,1,1),
layout_matrix = rbind(c(1, 2, 3),
c(4, 4, 4)))
|
Loading required package: gridExtra
Loading required package: ggplot2
`stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
`stat_bindot()` using `bins = 30`. Pick better value with `binwidth`.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.