Plotting#

easysnowdata.plotting#

Plotting helpers that read CF flag attributes (design contract §2.7).

Nothing here is required to use the data: the helpers build a ListedColormap + BoundaryNorm and a legend from flag_values / flag_meanings / flag_colors written by easysnowdata.processing.categorical, register named colormaps, and draw RGB quicklooks.

colormap_from_flags

Return (cmap, norm, table) for a categorical array's CF flags.

legend_handles

(handles, labels) for ax.legend from the CF flags (underscores → spaces).

categorical

Plot a categorical DataArray with one color per class and a legend.

register_colormap

Register a ListedColormap under name with matplotlib and return it.

rgb

Show a 0–1 RGB composite from easysnowdata.processing.rgb().