get_strip_labels | R Documentation |
This functions retrieves labels from facet strips with the labeller applied.
get_strip_labels(plot = get_last_plot())
plot |
A ggplot or build ggplot object. |
NULL
if there are no labels, otherwise a list of data.frames
containing the labels.
# 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.