Skip to contents

Discrete colour fill scales for Scottish Government plots

Usage

scale_fill_discrete_sg(
  palette = "main",
  palette_type = c("sg", "af"),
  reverse = FALSE,
  ...
)

Arguments

palette

Name of palette to use; e.g. "main", "sequential", "focus." Default value is "main."

palette_type

Either "sg" to use Scottish Government palettes, or "af" to use Analysis Function palettes. Defaults to "sg".

reverse

Boolean value to indicate whether the palette should be reversed.

...

Additional arguments passed to scale type.

Examples

library(ggplot2)

d <- subset(mpg, manufacturer == "ford")

ggplot(d, aes(x = class, fill = class)) +
 geom_bar() +
 scale_fill_discrete_sg()