I am trying to write some automated unit tests for a series of functions that generates ggplot graphics.
ggplot
For example, I want to set a specific colour sc
Try building the plot,
g <- ggplot_build(p) unique(g$data[[1]]["fill"]) fill 1 #1B9E77 16 #D95F02 28 #7570B3