scale_OkabeIto: Okabe-Ito color scale

Description Usage Arguments Details Examples

View source: R/reexport-colorblindr.R

Description

This is a color-blind friendly, qualitative scale with eight different colors. See palette_OkabeIto for details.

Usage

1
2
3
4
5
6
scale_color_OkabeIto(aesthetics = "colour", ...)

scale_fill_OkabeIto(aesthetics = "fill", ...)

scale_OkabeIto(aesthetics, use_black = FALSE, order = 1:8,
  alpha = NA, ...)

Arguments

aesthetics

aesthetic mappings

...

common discrete scale parameters: name, breaks, labels, na.value, limits, guide, and aesthetics. See discrete_scale for more details.

use_black

If TRUE, scale includes black, otherwise includes gray.

order

Numeric vector listing the order in which the colors should be used. Default is 1:8.

alpha

Alpha transparency level of the color. Default is no transparency.

Details

This code is copied and modified from colorblindr to remove the darken param, which is only available in unreleased colorspace 0.4.1.

Examples

1
2
3
4
5
library(ggplot2)
ggplot(iris, aes(Sepal.Length, Sepal.Width, color = Species)) +
  geom_point() + scale_color_OkabeIto()
ggplot(iris, aes(Sepal.Length, fill = Species)) +
  geom_density(alpha = 0.7) + scale_fill_OkabeIto(order = c(1, 3, 5))

hesselberthlab/scrunchy documentation built on Nov. 11, 2019, 2:29 p.m.