Learn R Programming

ggblanket (version 5.1.0)

pal_discrete2: A colour blind safe categorical palette with 6 colours

Description

A colour blind safe 6 colour palette used to colour a categorical col variable that works only on a light background.

Usage

pal_discrete2

Arguments

Value

A character vector of hex codes.

Format

An object of class character of length 6.

References

Derived from a Datawrapper blog dated 30/03/2022 by Lisa Charlotte Muth.

Examples

Run this code
scales::show_col(pal_discrete2)

ggplot2::diamonds |>
  gg_bar(x = color,
         col = color,
         pal = pal_discrete2,
         width = 0.75)

ggplot2::diamonds |>
  gg_blank(x = color,
           col = color,
           stat = "count",
           pal = pal_discrete2) +
  ggplot2::geom_point(stat = "count")

Run the code above in your browser using DataLab