powered by
This functions retrieves labels from facet strips with the labeller applied.
get_strip_labels(plot = get_last_plot())
NULL if there are no labels, otherwise a list of data.frames containing the labels.
NULL
A ggplot or build ggplot object.
# Basic plot p <- ggplot(mpg, aes(displ, hwy)) + geom_point() get_strip_labels(p) # empty facets get_strip_labels(p + facet_wrap(year ~ cyl)) get_strip_labels(p + facet_grid(year ~ cyl))
Run the code above in your browser using DataLab