make_grattan_pal | R Documentation |
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, ...)
palette |
(character; default = |
reverse |
(boolean; default = |
... |
Additional arguments to pass to |
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.
grattan_palettes
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.