Description Usage Arguments Value Author(s) Examples
View source: R/package_functions.R
Modifies grid.arrange from the gridExtra package to take a list of objects of ggplot objects.
1 | ggplot_grid(g, plot = TRUE, ...)
|
g |
A single ggplot object or a list of ggplot object defined as list(g1, g2, ...). |
plot |
Boolean (T, F) indicator of whether to plot or return a grob object |
... |
Other arguements passed to grid.arrange. |
A plot
Alex Hubbard (hubbard.alex@gmail.com)
1 2 3 4 5 6 7 8 9 10 11 12 | library(ggplot2)
g1 = ggplot(iris) +
ggtitle("Title", subtitle = "Subtitle") +
geom_point(aes(x = Sepal.Width, y = Sepal.Length, color = Species), size = 4) +
od_theme()
g2 = ggplot(iris) +
ggtitle("Title", subtitle = "Subtitle") +
geom_point(aes(x = Sepal.Width, y = Sepal.Length, color = Species), size = 4) +
od_theme(n = length(unique(iris$Species)))
ggplot_grid(list(g1, g2), nrow = 1, ncol = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.