colors: Color Scheme

Description Usage Arguments Examples

Description

Define a color scheme using the color-scheme plugin.

Usage

1
2
3
4
5
6
7
8
c_color_scheme(c, scheme, alpha = 0.5, reverse = FALSE, override = FALSE)

c_colors(
  c,
  palette = c("#ff6384", "#ff9f40", "#ffcd56", "#4bc0c0", "#36a2eb", "#9966ff",
    "#c9cbcf"),
  rev = FALSE
)

Arguments

c

An object of class charter as returned by c_hart.

scheme

A valid scheme from the color-scheme plugin.

alpha

The transparency value for the line fill color. Must be a number between 0 (fully transparent) and 1 (no transparency).

reverse

If set to TRUE, the order of the colors in the selected scheme is reversed.

override

If set to TRUE, the specified color scheme will override the existing color options. If FALSE, it is only applied when no color setting exists.

palette

Vector of colors, hex (#fff) or RGB as string rgb(255,255,255).

rev

Reverse the order in which to apply the colors.

Examples

1
2
3
4
mtcars %>% 
 c_hart(caes(qsec, mpg, group = cyl)) %>% 
 c_scatter() %>% 
 c_color_scheme("brewer.DarkTwo8")

JohnCoene/charter documentation built on Feb. 20, 2022, 11:07 p.m.