Possible duplicate:
How to extract fill colors from ggplot object?
In an arbitrary ggplot plot, let's say
p <- ggplot(data=PlantGrowth, aes(x=group, y=weight, fill=group)) + geom_boxplot()
there is a way to extract the code of the colors used (that is, a variable with the name "value", which we modify with the command
p + scale_fill_manual(values=c("#999999", "#E69F00", "#56B4E9"))
)?
I would like to get the colors used to change only one.
Thanks,
Francois
source share