DiscreteColorPlane-class: DiscreteColorPlane

DiscreteColorPlane-classR Documentation

DiscreteColorPlane

Description

DiscreteColorPlane constructor taking list with names mapping to color values in hex representation. This object is used when one has a one to one mapping between discrete set of strings/values to discrete set of colors.

Usage

DiscreteColorPlane(lookup)

Arguments

lookup

a "lookup table", which is a named list mapping discrete values to hex colors

Value

a new DiscreteColorPlane instance

Slots

lookup

a lookup table mapping values to hex colors

Examples


lookup <- as.list(col2hex(c("red", "blue", "green")))
names(lookup) <- c("a", "b", "c")
cp <- DiscreteColorPlane(lookup)

values <- c("a", "b", "c", "a", "c")

bbuchsbaum/colorplane documentation built on March 12, 2023, 8:11 a.m.