scale_lcars: Color and fill scale functions for LCARS colors

scale_lcarsR Documentation

Color and fill scale functions for LCARS colors

Description

Scale functions used with ggplot2.

Usage

scale_color_lcars(palette = "2357", discrete = TRUE, reverse = FALSE, ...)

scale_color_lcars1(
  color = "atomic-tangerine",
  discrete = TRUE,
  reverse = FALSE,
  dark = FALSE,
  ...
)

scale_color_lcars2(
  low = "atomic-tangerine",
  high = "near-blue",
  discrete = TRUE,
  reverse = FALSE,
  dark = FALSE,
  divergent = FALSE,
  ...
)

scale_fill_lcars(palette = "2357", discrete = TRUE, reverse = FALSE, ...)

scale_fill_lcars1(
  color = "atomic-tangerine",
  discrete = TRUE,
  reverse = FALSE,
  dark = FALSE,
  ...
)

scale_fill_lcars2(
  low = "atomic-tangerine",
  high = "near-blue",
  discrete = TRUE,
  reverse = FALSE,
  dark = FALSE,
  divergent = FALSE,
  ...
)

Arguments

palette

character, name of palette in lcars_pals().

discrete

logical, discrete or continuous palette.

reverse

logical, reverse color order.

...

additional arguments passed to ggplot2::discrete_scale() or ⁠ggplot2::scale_*_gradientn()⁠, for discrete or continuous palettes, respectively.

color

character, LCARS color name for sequential palette.

dark

logical, use black instead of white for the base color in sequential palette or midpoint in divergent palette.

low

character, LCARS color name.

high

character, LCARS color name.

divergent

logical, use a divergent palette instead of two-color sequential palette.

Examples

library(ggplot2)
p <- ggplot(diamonds, aes(carat, stat(count), fill = cut)) +
  geom_density(position = "fill")
p + scale_fill_lcars("2357")
p + scale_fill_lcars1("atomic-tangerine", dark = TRUE)
p + scale_fill_lcars2("pale-canary", "danub")

trekcolors documentation built on Sept. 13, 2024, 1:11 a.m.