| move_legend_to_separate_plot | R Documentation |
Using cowplot, this function extracts the legend from a ggplot object and places it in a separate plot below the original plot without the legend. This is useful for creating cleaner visualizations where the legend is displayed separately.
move_legend_to_separate_plot(plot, legend_rel_height = 0.4)
plot |
( |
legend_rel_height |
( |
A ggplot object with the legend placed in a separate plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.