gLegend: gLegend

Description Usage Arguments Examples

Description

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

Usage

1
gLegend(a.gplot)

Arguments

a.gplot

A ggplot object.

Examples

1
leg <- gLegend(my_plot)

hferg/hfgr documentation built on May 17, 2019, 3:56 p.m.