scale_colour_ussc: Colour scale constructor for USSC colours

Description Usage Arguments Author(s) Examples

View source: R/ussc_colours.R

Description

Colour scale constructor for USSC colours

Usage

1
scale_colour_ussc(palette = "main", discrete = TRUE, reverse = FALSE, ...)

Arguments

palette

Character name of palette in ussc_palettes_list (i.e. main, blue, light, dark, grey, mixed)

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_colour_gradientn(), used respectively when discrete is TRUE or FALSE

Author(s)

Zoe Meers

Examples

1
2
3
4
5
6
# Colour by discrete variable using default palette
ggplot2::ggplot(iris, ggplot2::aes(Sepal.Width, Sepal.Length, colour = Species)) + ggplot2::geom_point(size = 4) + ussc::scale_colour_ussc()
# Reverse colour using blue palette
ggplot2::ggplot(iris, ggplot2::aes(Sepal.Width, Sepal.Length, colour = Species)) + ggplot2::geom_point(size = 4) + ussc::scale_colour_ussc('blue', reverse=T)
# Remember, you can change the transparency of the colour by adding alpha to the geom_...() call
ggplot2::ggplot(iris, ggplot2::aes(Sepal.Width, Sepal.Length, colour = Species)) + ggplot2::geom_point(size = 4, alpha=0.4) + ussc::scale_colour_ussc('blue', reverse=T)

USStudiesCentre/ussc documentation built on Sept. 2, 2020, 2:51 p.m.