fmihpc/analysator

Janitor work: get_cmap wrapper function

Opened this issue · 0 comments

See, e.g.:
#253

Repeated pattern of matplotlib colormap API version checks, should be wrapped for brevity under pyPlots.

    if Version(matplotlib.__version__) < Version("3.5.0"):
        cmapuse=matplotlib.cm.get_cmap(name=colormap)
    else:
        cmapuse=matplotlib.colormaps.get_cmap(colormap)