scale_colour_sphsu: SPHSU colour scales

scale_colour_sphsuR Documentation

SPHSU colour scales

Description

Unit colours for ggplot2 graphs

Usage

scale_colour_sphsu(palette = "mixed", discrete = TRUE, reverse = FALSE, ...)

Arguments

palette

Character. Calls a palette from sphsu_cols. Current schemes are "main", "cool", "hot" and "mixed".

discrete

Logical. Toggle to represent discrete or continuous data.

reverse

Logical. Reverse order of colours at assignment.

...

other arguments passed on to discrete_scale (for discrete data) or scale_colour_gradient (for continuous).

Details

These functions call colour palettes based on Unit colour schemes

Author(s)

Andy Baxter

Examples


ggplot(iris, aes(Sepal.Width, Sepal.Length, col = Species)) +
  geom_point(size = 4) +
  scale_colour_sphsu()

ggplot(iris, aes(Sepal.Width, Sepal.Length, col = Sepal.Length)) +
  geom_point(size = 4) +
  scale_colour_sphsu("hot", discrete = FALSE)

ggplot(iris, aes(Sepal.Width, Sepal.Length, col = Sepal.Length)) +
  geom_point(size = 4) +
  scale_colour_sphsu("cool", discrete = FALSE)

ggplot(mpg, aes(manufacturer, fill = manufacturer)) +
  geom_bar() +
  theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  scale_fill_sphsu(palette = "mixed", guide = "none")



andrewbaxter439/SPHSUgraphs documentation built on Nov. 4, 2023, 11:52 p.m.