This function takes a grattan colour palette and generates more colours from it, so that there are enough to make your chart.

make_grattan_pal(palette = "sequential", reverse = FALSE, ...)

Arguments

palette

(character; default = "graph") given name of a grattan palette: grattan_palettes

reverse

(boolean; default = FALSE) indicating if palette should be reverse

...

Additional arguments to pass to colorRampPalette see details here colorRamp

Details

The interpolation method is set to "spline" (the default is "linear") in an attempt to reduce the number of vomit colours that get produced when generating many colours.

It returns a function that takes a single value and makes that many colours.

See also

Examples


ggplot2::ggplot(mtcars, ggplot2::aes(x = mpg, y = hp, colour = as.character(wt))) +
  ggplot2::geom_point() +
  ggplot2::scale_colour_manual(values = make_grattan_pal()(29))