Welcome to mcmaps’s documentation!#

API Reference#

Top-level package for mcmaps.

class mcmaps.ColormapContainer[source]

Bases: object

A container for dynamically registering and accessing colormaps.

All colormap names are dynamically registered as attributes of this class
and are available globally in Matplotlib by their names.
list_colormaps(include_reversed=False)[source]

List all available colormaps included in the package.

Parameters:

include_reversed (bool, optional) – Whether to include reversed colormaps in the list, by default False.

Returns:

A list of colormap names.

Return type:

list of str

mcmaps.save_all_colormaps_preview(output_dir='docs/colormaps', width=6, height=1)[source]

Save preview images of all registered colormaps to a directory.

Parameters:
  • output_dir (str) – Directory where the preview images will be saved.

  • width (float) – Width of the generated figure in inches.

  • height (float) – Height of the generated figure in inches.

Colormap Gallery

BlueDarkRed18
BlueDarkRed18
SunShine12
SunShine12
SyedSpectral
SyedSpectral