Is there a way to identify x, y, & legend titles within ggplot_build?

Hi,

I was wondering if there was a way to identify what the x, y and legend titles are from within ggplot_build somewhere.

While it normally is the variable name, it can be different if a computed variable is used.

library(tidyverse)

p <- iris %>% 
  tibble() %>% 
  ggplot() +
  geom_point(aes(Sepal.Width, Sepal.Length, col = Species))

ggplot_build(p)

Cheers

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.