grid_arrange_shared_axes | R Documentation |
This function creates a common legend for the given pots to share This was taken from the following link: https://github.com/tidyverse/ggplot2/wiki/Share-a-legend-between-two-ggplot2-graphs
grid_arrange_shared_axes( ..., list = NULL, ncol = NULL, nrow = 1, widths = NULL, title = NULL, xlab = NULL, ylab = NULL, fontfamily = "CM Roman", pdf_default = TRUE )
... |
A series of plots to share common axes. |
list |
A list of plots to share common axes. Defaults to NULL. If list is specified, ellipsis argument is ignored. |
ncol |
Number of columns of the arranged plots. Defaults to NULL, in which case it is the length of the list. |
nrow |
Number of rows of the arranged plots |
widths |
Width to control the plot size. |
title |
Plot-specific titles. Defaults to NULL. |
xlab |
Common x-axis title to plots. Defaults to first plot's. |
ylab |
Common y-axis title to plots. Defaults to first plot's. |
fontfamily |
Font family to be used in common axes labels. Defaults to CM Roman. |
pdf_default |
Whether to apply pdf_default, which can reset 'theme'. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.