Possible Duplicate:
How to extract the fill colours from a ggplot object?
In an arbitrary ggplot plot, say
p <- ggplot(data=PlantGrowth, aes(x=group, y=weight, fill=group)) + geom_boxplot()
is there a way to extract the code of the colors that were used (i.e. the variable named "values" that we modify with the command
p + scale_fill_manual(values=c("#999999", "#E69F00", "#56B4E9"))
) ?
I would like to get the colors used in order to modify only one.
Thank you,
François