ng_palette: Nightingale's colour palettes

Description Usage Arguments Author(s) Examples

Description

ng_palette_d() and ng_palette_c() (respectively for discrete and continuous palettes) return functions that take an integer argument (the required number of colours) and return a character vector of colours' hex codes. In addition, the functions also recognize the viridis palettes: "magma" (or "A"), "inferno" ("B"), "plasma" ("C"), "viridis" ("D"), or "cividis" ("D").

Usage

1
2
3
4
5
ng_palette_d(name = "all", reverse = FALSE)

ng_palette_c(name = "magma", reverse = FALSE, ...)

display_ng_palettes()

Arguments

name

Character name of the Nightingale (or viridis) colour palette.

reverse

Boolean indicating whether the palette should be reversed.

...

Additional arguments to pass to colorRampPalette()

Author(s)

Ilari Scheinin

Examples

1
2
3
4
5
6
7
8
#' # Display Nightingale's colour palettes
display_ng_palettes()

# Get 4 colours along the spectrum of the nwr palette
ng_palette_d("nwr")(4)

# Notice that the discrete palette "light", cannot return more than 5 colours
ng_palette_d("light")(6)

NightingaleHealth/ggforestplot documentation built on April 10, 2020, 7:01 p.m.