scale_colour_jecs: Colour scale constructor for Jecs colours

View source: R/jecs_colour_scale.R

scale_colour_jecsR Documentation

Colour scale constructor for Jecs colours

Description

Colour scale constructor for Jecs colours

Usage

scale_colour_jecs(palette = "jecs", discrete = TRUE, reverse = FALSE, ...)

Arguments

palette

Character name of palette in jecs_palettes

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_color_gradientn(), used respectively when discrete is TRUE or FALSE

Examples

## Not run: 
library(ggplot2)
# Colour by discrete variable using default palette
ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Species)) +
  geom_point(size = 4) +
  scale_colour_jecs()

# Colour by numeric variable with cool palette
ggplot(iris, aes(Sepal.Width, Sepal.Length, colour = Sepal.Length)) +
  geom_point(size = 4, alpha = .6) +
  scale_colour_jecs(discrete = FALSE, palette = 'mj')

## End(Not run)


fabregithub/r4jecs documentation built on June 13, 2025, 4:50 p.m.