join_plots | R Documentation |
Plot several plots with a shared legend
join_plots(
plots,
ncol = length(plots),
nrow = 1,
position = c("right", "bottom"),
legend = TRUE
)
plots |
list of plot objects of class |
ncol |
Optional number of columns |
nrow |
Optional number of rows |
position |
position of the legend ("bottom" or "right") |
legend |
Logical. Use a legend? |
modified from https://github.com/tidyverse/ggplot2/wiki/share-a-legend-between-two-ggplot2-graphs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.