scale_sciensano: Sciensano Discrete Color/Colour Scales

scale_color_sciensanoR Documentation

Sciensano Discrete Color/Colour Scales

Description

See pal_sciensano for details.

Usage

scale_color_sciensano(
  palette = c("default", "contrast", "GnRd", "PuBl", "region"),
  alpha = 1,
  reverse = FALSE,
  ...
)

scale_colour_sciensano(
  palette = c("default", "contrast", "GnRd", "PuBl", "region"),
  alpha = 1,
  reverse = FALSE,
  ...
)

scale_fill_sciensano(
  palette = c("default", "contrast", "GnRd", "PuBl", "region"),
  alpha = 1,
  reverse = FALSE,
  ...
)

Arguments

palette

Palette type. Currently there are four available general options: "default", "contrast", "GnRd", "PuBl" containing all or a subset of the palette (The default package is a 14-color palette inspired by Sciensano).

alpha

Transparency level, a real number in (0, 1]. See alpha in rgb for details.

reverse

Logical. Should the order of the colors be reversed?

...

additional parameters for discrete_scale

Examples

## Not run: library("ggplot2")
data("diamonds")

ggplot(
  subset(diamonds, carat >= 2.2),
  aes(x = table, y = price, colour = cut)
) +
  geom_point(alpha = 0.7) +
  geom_smooth(method = "loess", alpha = 0.1, size = 1, span = 1) +
  theme_bw() + scale_color_sciensano()

ggplot(
  subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),
  aes(x = depth, fill = cut)
) +
  geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
  theme_bw() + scale_fill_sciensano()
## End(Not run)

sciensanogit/ggsano documentation built on April 14, 2022, 8:57 p.m.