scale_colour_wolves: Colour scale constructor for wwfc colours

Description Usage Arguments Examples

View source: R/palettes.R

Description

Custom colour scale functions for ggplot2. Handles discrete or continuous scales.

Usage

1
2
3
4
5
6
scale_colour_wolves(
  palette = "wooly_bully",
  discrete = TRUE,
  reverse = FALSE,
  ...
)

Arguments

palette

Character name of palette in wwfc_palettes

discrete

Boolean indicating whether colour aesthetic is discrete or not

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments passed to discrete_scale() or scale_color_gradientn() according to whether discrete arg is TRUE or FALSE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Color by discrete variable using default palette
library(ggplot2)
ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) +
  geom_point(size = 4) +
  wolves_theme() +
  scale_colour_wolves()

# Color by numeric variable with likert palette
ggplot(iris, aes(Sepal.Width, Sepal.Length, color = Sepal.Length)) +
  geom_point(size = 4) +
  wolves_theme() +
  scale_colour_wolves(discrete = FALSE, palette = "sir_jack")

lizardburns/wwplot documentation built on Jan. 5, 2022, 12:26 a.m.