ColorKeySextant | R Documentation |
Plot a sextant scheme legend.
ColorKeySextant(
center,
values,
label_as,
show_center,
limits = matrix(0:1, nrow = 2, ncol = 3)
)
center |
Ternary coordinates of the sextant meeting point. |
values |
6 element character vector of rgb-codes. |
label_as |
"pct" for percent-share labels or "pct_diff" for percent-point-difference from center labels. |
show_center |
Should the center be marked on the legend? (logical) |
limits |
A 2 by 3 matrix of lower and upper limits for p1, p2 and p3. |
A ggtern grob.
# NOTE: only intended for internal use and not part of the API
tricolore:::ColorKeySextant(center = prop.table(runif(3)),
values = c('#01A0C6', '#B8B3D8', '#F11D8C',
'#FFB3B3', '#FFFF00', '#B3DCC3'),
label_as = 'pct_diff', show_center = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.