NCAR/pyngl

Is it possible to convert colormaps to be used in matplotlib?

guidocioni opened this issue · 2 comments

Although pyngl is in maintenance mode since years I still have installed because of some functionalities that I couldn't find anywhere else (like natgrid).

Another feature that I would like to port are the colormaps.

Is it possible to get a colormap defined in pyngl and convert it to one that matplotlib understands?

It was as easy as

import Ngl
cmap = colors.ListedColormap(Ngl.read_colormap_file(cmap_name),
                             name=cmap_name)

Thanks very much, @guidocioni !