Description Usage Arguments Details Value See Also Examples
This function assigns colours on a linear scale to a numeric
vector. Default is to try to use RColorBrewer
for colours, and
cm.colors
otherwise. Can provide custom range, breaks and colours.
1 | cont2color(x, xrange = NULL, breaks = NULL, colors = NULL)
|
x |
A numeric vector. |
xrange |
The range to use for the colour scale. |
breaks |
The number of breaks at which to change colour. |
colors |
The colours to use. Defaults to a diverging colour scheme;
either |
Uses the RColorBrewer
package if installed. Coerces x
to numeric with a warning.
A character vector of colours.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.