scale_custom: Custom color and fill scales

scale_customR Documentation

Custom color and fill scales

Description

Custom coloring and filling functions based on unique color palettes

Usage

scale_color_unibas_d(palette = "unibas", extend = FALSE, ...)

scale_colour_unibas_d(palette = "unibas", extend = FALSE, ...)

scale_fill_unibas_d(palette = "unibas", extend = FALSE, ...)

scale_color_unibas_op(
  palette = "unibas",
  val_names = c("good", "neutral", "bad"),
  ...
)

scale_colour_unibas_op(
  palette = "unibas",
  val_names = c("good", "neutral", "bad"),
  ...
)

scale_fill_unibas_op(
  palette = "unibas",
  val_names = c("good", "neutral", "bad"),
  ...
)

scale_color_unibas_div(palette = "unibas", ...)

scale_colour_unibas_div(palette = "unibas", ...)

scale_fill_unibas_div(palette = "unibas", ...)

scale_color_unibas_c(palette = "unibas", ...)

scale_colour_unibas_c(palette = "unibas", ...)

scale_fill_unibas_c(palette = "unibas", ...)

Arguments

palette

Name of color palette

extend

Whether to extend discrete color palette to make sufficient colors for levels needed

...

Additional arguments to be passed to internal scale function

val_names

For opinionated scales, defaults to "good", "neutral", "bad"

Details

Specific functions include:

  • scale_(color/colour/fill)_unibas_d : Discrete palette with either fixed or dynamically extended number of shades

  • scale_(color/colour/fill)_unibas_op\b : Discrete palette with fixed colors for "good", "bad", and "neutral"

  • scale_(color/colour/fill)_unibas_div : Continuous diverging color palette, must contain negative, neutral, positive values

  • scale_(color/colour/fill)_unibas_c : Continuous color palette

Examples

library(ggplot2)
library(instools)
ggplot(diamonds[1:2000,], aes(x = cut, y = carat,
color = cut)) +
geom_point() +
scale_color_unibas_d()

INS-Basel/hsrtools documentation built on April 20, 2024, 5:15 p.m.