Description Usage Arguments Author(s) Examples
Colour scale constructor for USSC colours
1  | scale_colour_ussc(palette = "main", discrete = TRUE, reverse = FALSE, ...)
 | 
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  | 
Zoe Meers
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)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.