Description Usage Arguments Author(s) Examples
Arrange a list of ggplots with grid.arrange and
output on local graphic device or as pdf/png when a path is supplied.
ggplotGridA4
writes the plots to a DIN A4 (8 x 11 inches) pdf file
directly.
1 2 3 4 5 6 |
l |
List with ggplot objects. |
path |
Plot to file of type pdf or png. Determine type by
path ending (.pdf or .png). |
ncol |
Number of columns. |
nrow |
Number of rows per page, only for pdfs. |
width |
For pdfs/pngs the width in inches, else ignored. |
height |
For pdfs/pngs the height in inches, else ignored. |
res |
Resolution in dpi for pngs. |
pdf.cairo |
Use cairo_pdf (or cairo_ps, svg) instead of pdf |
onefile |
Create one file, see cairo_pdf. |
... |
Forwarded to cairo_pdf |
wide |
Wide format pdf pages (11x8 inches). |
x |
A list containing at least one ggplot object of class |
Sven E. Templer
1 2 3 4 5 6 7 8 9 10 11 12 | #
## Not run:
library(ggplot2)
d <- data.frame(a=1:5,b=1:5)
x <- list(
ggplot(d, aes(x=a,y=b,col=b)) + geom_line(),
ggplot(d, aes(x=a,y=b,shape=factor(b))) + geom_point())
ggplotlist(x, 2)
## End(Not run)
#
|
Warning message:
In file(con, "r") : cannot open file '/proc/stat': Permission denied
Warning message:
In ggplotlist(x, 2) :
ggplotlist is deprecated. Use 'ggplotGrid' or 'ggplotGridA4'. See the help page.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.