Skip to main content

Module colormap

Module colormap 

Source
Expand description

Continuous color maps and value normalization for heatmaps and any other value-to-color chart.

A GradientColorMap linearly interpolates between a small set of RGB color stops; several standard maps are provided as named constructors, with sources cited. A Normalization maps a data value onto the map’s [0, 1] input.

Sequential maps (viridis, magma, blues, reds) are sampled from matplotlib / ColorBrewer. The diverging maps (rd_bu, coolwarm) are meant for values centered on a midpoint (e.g. correlations around 0) and pair with Normalization::Symmetric.

Structs§

GradientColorMap
A color map built from sorted RGB stops, interpolated linearly in RGB space.

Enums§

Normalization
Maps a data value onto the [0, 1] input of a GradientColorMap.