get_gg_legend: Get the legend of a plot as a grob

View source: R/get_gg_legend.R

get_gg_legendR Documentation

Get the legend of a plot as a grob

Description

get_gg_legend returns the legend of a ggplot object as a grob

Usage

get_gg_legend(ggplot_obj)

Arguments

ggplot_obj

ggplot object - the plot to get the legend from

Value

grob

Examples


legend <- get_gg_legend(ggplot_obj)


richysix/biovisr documentation built on Feb. 3, 2024, 4:36 a.m.