I keep thinking that there must be an absolutely simple answer to my question, but I just can't seem to find it. Take this example plot:
library(ggplot2)
qplot(cty, displ, colour=displ, data=mpg)
This makes low values of displ appear in a dark blue and high values of displ appear in a light blue.
All I want to do is reverse the color gradient, because that seems more intuitive to me. I want low values of displ to have the light blue color and high values to have the dark blue color.
I know of this possibility to manually specify colors:
scale_colour_gradient(low="grey", high="black")
But I want to use the default colors, just in reverse.
Just take the default color codes from
?scale_colour_gradient
and swap the arguments: