Helper function to extract ggplot layer names from a ggplot object
Examples
if (FALSE) { # \dontrun{
library(ggplot2)
fig <- ggplot(mtcars, aes(x = cyl, y = mpg, group = cyl)) + geom_boxplot() + geom_point()
get_ggplot_layer_names(fig)
} # }
Helper function to extract ggplot layer names from a ggplot object
if (FALSE) { # \dontrun{
library(ggplot2)
fig <- ggplot(mtcars, aes(x = cyl, y = mpg, group = cyl)) + geom_boxplot() + geom_point()
get_ggplot_layer_names(fig)
} # }