View source: R/get_gg_legend.R
get_gg_legend | R Documentation |
get_gg_legend
returns the legend of a ggplot object as a grob
get_gg_legend(ggplot_obj)
ggplot_obj |
ggplot object - the plot to get the legend from |
grob
legend <- get_gg_legend(ggplot_obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.