getLegend | R Documentation |
The function extracts the legend of a ggplot object.
getLegend(plt)
plt |
A ggplot object. |
The legend of plt
or NULL
if no legend was found.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.