Skip to contents

Applies a ggplot2 color scale using one of the custom color palettes from charite_palettes

Usage

scale_color_charite(palette = "primary", discrete = TRUE, reverse = FALSE, ...)

Arguments

palette

Character name of a palette in charite_palettes

discrete

Logical. Should the palette use discrete color steps?

reverse

Logical. Should the palette be reversed?

...

Additional arguments passed to ggplot2::discrete_scale()

Value

A ggplot2 scale object

Examples

library(ggplot2)
ggplot(mtcars, aes(mpg, cyl, color = mpg)) +
  geom_point(size = 3) +
  scale_color_charite("berryseason", discrete = FALSE) +
  theme_charite()


ggplot(mtcars, aes(factor(cyl), color = factor(cyl))) +
  geom_point(size = 5, stat = "count") +
  scale_color_charite("secondary") +
  theme_charite()