Skip to contents

add a distinct color for a specific value in the legend color map

Usage

addSingleValue(ColMap, s1 = 0.05, s2 = 0.001)

Arguments

ColMap

a named numeric vector,e.g. c('yellow'=0,'red'=8.99,'green4*'=9)

s1, s2

portion of the whole legend; they are used to control the width of the color band for the specific value; for example

  • c('yellow'=0,'red'=8.95,'green4*'=9), the width is 8.95*(1+s2) to 9

  • c('yellow*'=0,'red'=0.05,'green4'=9), the width is 0 to 0.05*(1-s2)

  • c('yellow'=0,'red*'=1,'green4'=9), the width is 1*(1-s1) to 1*(1+s1)

Value

a list of two numeric vectors

  • colmap: the adjusted color maps

  • breaks: the breaks for colmap

Examples

# examples at https://blueskypie.github.io/cHeatmap/articles/cHeatmap-intro.html