| values.to.colorlayer | R Documentation |
Map values to a color layer and the matching colorbar metadata.
values.to.colorlayer(values, makecmap_options)
values |
numeric vector, the values to map to colors. |
makecmap_options |
named list of parameters to pass to |
named list with entries 'colors' (the hex color strings for the values) and 'makecmap_options' (the input options, extended with the effective range, for use as colorbar metadata).
The colors are computed from the color ramp that the colorbar uses for the same options, i.e., the values are binned into the interval boundaries of a ramp of 'n' colors over the value range, so the colorbar always matches the data. Values which are not finite (NA/NaN/Inf) get the color 'col.na'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.