
Continuous scales to use for ggplot2
Source:R/ggplot2_scales_continuous.R
ggplot2-scales-continuous.RdThese functions provide the option to use continuous palettes along with the
ggplot2 package. It goes without saying that it requires ggplot2 to work.
Usage
scale_colour_paletteer_c(palette, direction = 1, ...)
scale_color_paletteer_c(palette, direction = 1, ...)
scale_fill_paletteer_c(palette, direction = 1, ...)Arguments
- palette
Name of palette as a string. Must be on the form packagename::palettename.
- direction
Either
1or-1. If-1the palette will be reversed.- ...
Arguments to pass on to
ggplot2::scale_colour_gradientn()orggplot2::scale_fill_gradientn()
Details
Available package/palette combinations are available in the data.frame
palettes_c_names.
Examples
library(ggplot2)
ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Petal.Length)) +
geom_point() +
scale_colour_paletteer_c("scico::tokyo")