map_colors | R Documentation |
instantiate a vector of colors from a ColorPlane specification.
map_colors(x, ...) ## S4 method for signature 'ConstantColorPlane' map_colors(x) ## S4 method for signature 'HexColorPlane' map_colors(x) ## S4 method for signature 'DiscreteColorPlane' map_colors(x, values, ...) ## S4 method for signature 'IntensityColorPlane' map_colors(x, alpha = 1, threshold = NULL, irange = NULL)
x |
the object to map over |
... |
extra args |
values |
the values to map to colors via the discrete lookup table |
alpha |
alpha multiplier from 0 to 1. |
threshold |
two-sided threshold as a 2-element vector, e.g. 'threshold=c(-3,3)' indicating two-sided transparency thresholds. |
irange |
the intensity range defining min and max of scale. |
a HexColorPlane
instance containing the mapped colors
cp <- IntensityColorPlane(seq(1,100), cols=rainbow(25)) cl <- map_colors(cp, irange=c(0,50)) stopifnot(cl@clr[50] == rainbow(25)[25])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.