cet_pal {cetcolor} | R Documentation |
CET Perceptually Uniform Color Maps
Description
Extract n
RGB Hexadecimal colors from the perceptually uniform color
maps developed by Peter Kovesi.
Usage
cet_pal(n, name = "rainbow", alpha = 1)
Arguments
n |
A |
name |
A |
alpha |
A |
Value
A character
vector containing the RGB hexadecimal
representation of the requested color map.
References
Peter Kovesi. Good Colour Maps: How to Design Them. arXiv:1509.03700 cs.GR 2015
Examples
# Grab 8 colors from rainbow or rainbow_bgyr_35-85_c73_n256
colors = cet_pal(8)
plot(1:8, 1:8, col=colors, pch=19, cex=3, xlab="", ylab="")
# Grab 25 colors from coolwarm or diverging_bwr_40-95_c42_n256
colors = cet_pal(25, name = "coolwarm")
plot(1:25, 1:25, col=colors, pch=19, cex=3, xlab="", ylab="")
[Package cetcolor version 0.2.0 Index]