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 |
a ggplot object |
the legend as a grob
plot_legend <- get_gg_legend(ggplot_obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.