get_legend | R Documentation |
This function extracts the ggplot legend to plot separately.
get_legend(ggplot_object)
ggplot_object |
A ggplot object. |
get_legend(my_ggplot)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.