Skip to contents

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

if (FALSE) library("ggplot2")
data("diamonds")
#> Warning: data set ‘diamonds’ not found

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()
#> Error in ggplot(subset(diamonds, carat >= 2.2), aes(x = table, y = price,     colour = cut)): could not find function "ggplot"

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()
#> Error in ggplot(subset(diamonds, carat > 2.2 & depth > 55 & depth < 70),     aes(x = depth, fill = cut)): could not find function "ggplot"