Description Usage Arguments Value Note Examples
Allows for merging of different sized R plots.
1 |
n.plots |
The number of plots to be combined. |
file |
A connection, or a character string naming the file to print to. |
widths |
A vector of widths equal to |
heights |
A vector of heights equal to |
n.lines |
A vector of integer values indicating the number of lines each plotting sequence will take. Default is 1 line each. |
Returns a single combined plot of various sizes.
To use with ggplot the plotting sequence must be wrapped with
plot()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
merge_pdf(3, file = "foo.pdf", widths = c(7, 7, 10), heights = c(6, 10, 7))
plot(1:10)
plot(1:10, pch=19)
plot(1:10, col="red", pch=19)
library(ggplot2)
p <- ggplot(mtcars, aes(factor(cyl), mpg)) + geom_boxplot()
merge_pdf(2, file = "bar.pdf", widths = c(7, 10), heights = c(6, 10))
plot(1:10)
print(p)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.