get_gg_legend: get_gg_legend

View source: R/get_gg_legend.R

get_gg_legendR Documentation

get_gg_legend

Description

get_gg_legend returns the legend of a ggplot object as a grob

Usage

get_gg_legend(ggplot_obj)

Arguments

ggplot_obj

a ggplot object

Value

the legend as a grob

Examples

plot_legend <- get_gg_legend(ggplot_obj)


richysix/miscr documentation built on March 24, 2023, 5:24 a.m.