Description Usage Arguments Value Author(s) Examples
Map a vector of values to hex colors
1 2 | map_values_to_colors(values, color_type = "discrete", color_cutoff = 0,
pallete = "RdBu")
|
values |
numeric vector of values |
color_type |
type of color palette to map values to (discrete or continous) |
color_cutoff |
value which seperates values into higher or lower for discrete color mapping |
palette |
RColorBrewer pallete name, viridis palette name (if continous), or two colors to create a colorRampPalette from. |
vector of hex colors
Beth Signal
1 2 3 4 | map_values_to_colors(seq(-4, 5))
map_values_to_colors(seq(-4, 5), color_type = "continous")
map_values_to_colors(seq(-4, 5), color_type = "continous", pallete = "magma")
map_values_to_colors(seq(-4, 5), color_type = "continous", pallete = c("lightblue", "blue"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.