get_legend.Rd
Extracts legend grob from a ggplot object
get_legend(gg_plot)
gg_plot |
|
---|
object containing legend
data(examples_data)#> Warning: data set ‘examples_data’ not foundget_legend(hm)#> TableGrob (5 x 5) "guide-box": 2 grobs #> z cells name #> 99_881e7ea54b5e8c6568e9ce4e2f59d04b 1 (3-3,3-3) guides #> 0 (2-4,2-4) legend.box.background #> grob #> 99_881e7ea54b5e8c6568e9ce4e2f59d04b gtable[layout] #> zeroGrob[NULL]