powered by
Use XKCD's "Painbow" colormap
scale_color_painbow(...) scale_colour_painbow(...) scale_fill_painbow(...)
Any arguments are passed to ggplot2:scale_fill_gradientn()
ggplot2:scale_fill_gradientn()
The colors were extracted directly from the colorscale in XKCD's image (https://xkcd.com/2537/).
See ggplot2:scale_fill_gradientn() for additional arguments.
# NOT RUN { # You can use it for continuous data library(ggplot2) ggplot(faithfuld) + aes(waiting, eruptions, fill = density) + geom_tile() + scale_fill_painbow() # }
Run the code above in your browser using DataLab