Description Usage Arguments Value Examples
ggplot objects can be passed in ..., or to plotlist (as a list of ggplot objects)
1 |
... |
ggplot objects |
plotlist |
A list of ggplot objects |
cols |
Number of columns in layout |
layout |
A matrix specifying the layout. If present, 'cols' is ignored. |
a multi-panel plot
If the layout is something like matrix(c(1,2,3,3), nrow=2, byrow=TRUE), then plot 1 will go in the upper left, 2 will go in the upper right, and 3 will go all the way across the bottom.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(tidyverse)
library(maxxxy)
p1 <- iris %>%
as_tibble() %>%
ggplot(aes(Sepal.Width, Sepal.Length, color = Species)) +
geom_point()
p2 <- iris %>%
as_tibble() %>%
ggplot(aes(Sepal.Width, fill = Species)) +
geom_density(alpha = 0.5)
p3 <- iris %>%
as_tibble() %>%
ggplot(aes(Species, Sepal.Width, fill = Species)) +
geom_boxplot()
multiplot(p1, p2, p3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.