Description Usage Arguments Value Author(s) Examples
Simple function to map numerical input values into colors.
1 | value2Color(x, colramp = colorRampPalette(brewer.pal(11, "RdBu"))(255), min.x, max.x, color.centered = TRUE, force.range = FALSE)
|
x |
The value(s) that should be translated into corresponding colors. |
colramp |
The color ramp that represents the color space corresponding to the numerical input space. |
min.x |
Smallest value to be expected as an input. |
max.x |
Largest value to be expected as an input. |
color.centered |
Whether the color bar/palette should be centered, i.e. symmetric around the central value. |
force.range |
If true, any input value that is larger than |
A character (vector) with corresponding color(s).
Johannes Rainer
1 | value2Color( c( 2, 3, 1, 3 ), min.x=1, max.x=3 )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.