Skip to contents

The code for creating a function that maps values to colors for ComplexHeatmap heatmaps is not easy for me to remember. Here it is.

Usage

ft_complexheatmap_scale()

Value

string

Details

My favorite colors to use include:

  • viridis::viridis

  • scico::scico(n, palette = "vik")

You can also use scico::scico_palette_show() to see other colorblind safe palettes.

Examples

ft_complexheatmap_scale()
#> n_value = 20
#> circlize::colorRamp2(seq(low, high, length.out = n_value), viridis::viridis(n_value))
#> 
#> or
#> 
#> circlize::colorRamp2(seq(low, high, length.out = n_value), scico::scico(n_value, palette = "vik"))