View source: R/make_color_vector_function.R
make_color_vector | R Documentation |
Function that takes a vector of values and a desired color palette and returns color values that correspond to each vector value.
make_color_vector(vec, palette = NA, min = NA, max = NA, step = 1, alpha = 1)
vec |
Value vector |
min |
Minimum value to consider for the scaling of the color values (may subceed the value vector) |
max |
Maximum value to consider for the scaling of the color values (may exceed the value vector) |
step |
Step width between values to consider for the scaling of the color values |
alpha |
Transparency from 0 = fully transparent to 1 = fully opaque |
col.palette |
Color palette, e.g. default R palettes or created with colorRampPalette function |
Vector of color codings with the same length and order as the input vector
Nikolai Knapp
in progress
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.