Continuous colour/fill scales for Scottish Government plots
Source:R/scale_continuous_sg.R
scale_colour_continuous_sg.Rd
Continuous colour/fill scales for Scottish Government plots
Usage
scale_colour_continuous_sg(
palette = "sequential",
palette_type = c("sg", "sss", "af"),
reverse = FALSE,
na_colour = "grey50",
guide = "colourbar",
...
)
scale_fill_continuous_sg(
palette = "sequential",
palette_type = c("sg", "sss", "af"),
reverse = FALSE,
na_colour = "grey50",
guide = "colourbar",
...
)
Arguments
- palette
Name of palette to use; e.g. "main", "sequential", "focus". Default value is "sequential".
- palette_type
Either "sg" to use Scottish Government palettes (default), "sss" to use Social Security Scotland palettes or "af" to use Analysis Function palettes.
- reverse
Boolean value to indicate whether the palette should be reversed.
- na_colour
Colour to set for missing values.
- guide
A name or function used to create guide. Default is "colourbar".
- ...
Additional arguments passed to scale type.
Examples
library(ggplot2)
ggplot(mtcars, aes(x = mpg, y = wt, colour = cyl)) +
geom_point() +
scale_colour_continuous_sg()
ggplot(faithfuld, aes(x = waiting, y = eruptions, fill = density)) +
geom_raster() +
scale_fill_continuous_sg()