powered by
These functions provide the option to use continuous palettes along with the ggplot2 package. It goes without saying that it requires ggplot2 to work.
ggplot2
scale_colour_paletteer_c(palette, direction = 1, ...)scale_color_paletteer_c(palette, direction = 1, ...)scale_fill_paletteer_c(palette, direction = 1, ...)
scale_color_paletteer_c(palette, direction = 1, ...)
scale_fill_paletteer_c(palette, direction = 1, ...)
A ScaleContinuous object that can be added to a ggplot object
ScaleContinuous
ggplot
Name of palette as a string. Must be on the form packagename::palettename.
Either 1 or -1. If -1 the palette will be reversed.
1
-1
Arguments to pass on to ggplot2::scale_colour_gradientn() or ggplot2::scale_fill_gradientn()
ggplot2::scale_colour_gradientn()
ggplot2::scale_fill_gradientn()
Available package/palette combinations are available in the data.frame palettes_c_names.
palettes_c_names
if (require("ggplot2")) { ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) + geom_point() + scale_colour_paletteer_c("scico::tokyo") }
Run the code above in your browser using DataLab