API reference

andrey.viz.mpl.cmap#

andrey.viz.mpl.cmap(dark=False, name=None)[source]#

Return the sequential cobalt colormap for heatmaps, weights, and densities.

This is the confidence ramp: reach for it whenever a value is ordered (edge stability, an adjacency weight, a density), and for cycle() when it is categorical.

Parameters:
  • dark (bool) – Select the dark palette instead of the light one.

  • name (str | None) – The name carried on the returned colormap object. None uses "andrey" ("andrey-dark" when dark). Nothing is registered globally, so pass the object itself as cmap=, not the name.

Returns:

The ramp, interpolated from the palette’s five cobalt stops.

Return type:

LinearSegmentedColormap

Raises:

ModuleNotFoundError – If matplotlib is not installed. Install the extra: pip install 'andrey-core[viz]'.