Colormap Registry (dm.cmap)

Custom colormap registry.

The dartwork_mpl.cmap module reads colormap text files from asset/cmap/ at import time and registers them with matplotlib. Most consumers never touch this module directly — once import dartwork_mpl as dm runs, the registered colormaps are available through normal matplotlib APIs (plt.imshow(..., cmap="..."), mpl.colormaps[...]).

To inspect the registered set, see Asset Diagnostics or call dm.list_colormaps() / dm.plot_colormaps() from dartwork_mpl.diagnostics.

API

Colormap management utilities for Matplotlib.

Loads custom colormaps from text files in the package’s asset/cmap directory and registers them with matplotlib.

dartwork_mpl.cmap.ensure_loaded() None[source]

Ensure all custom colormaps are loaded and registered.

Thread-safe: uses double-checked locking to avoid re-registering colormaps with matplotlib’s registry, which would raise ValueError.