View source: R/get_colors_for_discrete_value.R
| get_colors_for_discrete_value | R Documentation |
Generate custom colors from discrete values for heatmaps.
get_colors_for_discrete_value(color_intervals_list, value_intervals_list)
color_intervals_list |
a list for building color intervals. |
value_intervals_list |
a list for building value intervals. |
A vectors containing color distributions.
Dongdong Zhan and Mengsha Tong
value_intervals_list <- list(
seq(-4, -2, 0.2),
seq(-2, -1, 0.2),
seq(-1, 1, 0.2),
seq(1, 2, 0.2),
seq(2, 4, 0.2)
)
color_intervals_list <- list(
c('blue', '#33CCFF'),
c('#33CCFF', 'green'),
c('green', 'white', '#FF6600'),
c('#FF6600', 'red'),
c('red', 'firebrick')
)
colors <- get_colors_for_discrete_value(
color_intervals_list,
value_intervals_list
)
head(colors)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.