scale_fill_ussc: Fill scale constructor for USSC colours

Description Usage Arguments Author(s) Examples

View source: R/ussc_colours.R

Description

Fill scale constructor for USSC colours

Usage

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

Arguments

palette

Character name of palette in ussc_pal (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_fill_gradient(), used respectively when discrete is TRUE or FALSE

Author(s)

Zoe Meers

Examples

1
2
3
4
# Fill by discrete variable with different palette + remove legend (guide)
ggplot2::ggplot(mpg, ggplot2::aes(manufacturer, fill = manufacturer)) + ggplot2::geom_bar() + ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 45, hjust = 1)) + ussc::scale_fill_ussc(palette = "main", guide = "none")
# Set colour transparency by calling alpha in the geom_...() command
ggplot2::ggplot(mpg, ggplot2::aes(manufacturer, fill = manufacturer)) + ggplot2::geom_bar(alpha=0.7) + ggplot2::theme(axis.text.x = ggplot2::element_text(angle = 45, hjust = 1)) + ussc::scale_fill_ussc(palette = "main", guide = "none")

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