scale_crayons: Crayon Color Scales for 'ggplot2'

scale_color_crayonsR Documentation

Crayon Color Scales for ggplot2

Description

Crayon Color Scales for ggplot2

Usage

scale_color_crayons(palette = "standard16", which = NULL, ..., reverse = FALSE)

scale_fill_crayons(palette = "standard16", which = NULL, ..., reverse = FALSE)

scale_colour_crayons(
  palette = "standard16",
  which = NULL,
  ...,
  reverse = FALSE
)

Arguments

palette

palette from names(crayons) to use

which

numeric indices of colors to use. NULL by default.

...

arguments passed on to ggplot2::discrete_scale()

reverse

Should the vector be reversed? Default is FALSE.

Value

A ggplot2::Scale

Examples

library(ggplot2)
ggplot2::mpg |>
  ggplot() +
   geom_point(aes(displ, hwy, colour = class)) +
   scale_color_crayons(palette = 'original')

ggplot2::mpg |>
  ggplot() +
   geom_point(aes(displ, hwy, fill = class), pch = 23, color = 'transparent') +
   scale_fill_crayons(palette = 'original')


crayons documentation built on March 31, 2023, 11:52 p.m.