I have a fix ggplot object (coming from a nice function that I do not want to touch). However, I would like to add some coloring afterwards, thus add new data. How would that be possible?
Here's a simple example.
gg <- ggplot(iris, aes(Sepal.Length, Sepal.Width)) + geom_point()
Now, I want object gg to be colored by Petal.Length,e.g. something like (but that's not working)
gg_colored <- gg + aes(col=Petal.Length)
to obtain:
