Learn R Programming

tricolore (version 1.2.2)

ColorMapSextant: Sextant Encoding of Ternary Composition

Description

Return the sextant scheme colors for a matrix of ternary compositions.

Usage

ColorMapSextant(P, center, values)

Arguments

P

n by 3 matrix of ternary compositions p1, p2, p3_i for i=1, ..., n.

center

Ternary coordinates of the sextant meeting point.

values

6 element character vector of rgb-codes.

Value

An n row data frame giving, for each row of the input P, the input proportions (p1, p2, p3), sextant id (sextant) and the hex-rgb string of the mixed colors (rgb).

Examples

Run this code
# NOT RUN {
P <- prop.table(matrix(runif(9), ncol = 3), 1)
tricolore:::ColorMapSextant(P, c(1/3, 1/3, 1/3),
                            c('#01A0C6', '#B8B3D8', '#F11D8C', '#FFB3B3',
                              '#FFFF00', '#B3DCC3'))
# }

Run the code above in your browser using DataLab