Description Usage Arguments Examples
A function to strip the legend from a ggplot object so that it can then be resued. For example, you might want to plot 6 figures on one page with the same legend. This function can take the legend from one of the plots, and then plot it later on after the 6 plots are plotted with no legend. Normally used as part of ggplotSharedLegend. HFG: From https://github.com/hadley/ggplot2/wiki/Share-a-legend-between-two-ggplot2-graphs
1 | gLegend(a.gplot)
|
a.gplot |
A ggplot object. |
1 | leg <- gLegend(my_plot)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.