lair.plotter.NCL_cmap#

lair.plotter.NCL_cmap(table_name)[source]#

Generate matplotlib colormap from NCL color table.

Parameters:

table_name (str) – Name of the table on NCL’s color table page, e.g. "WhiteBlueGreenYellowRed". The table is downloaded from NCL’s site.

Returns:

matplotlib.colors.LinearSegmentedColormap – matplotlib colormap from NCL color table.

Return type:

LinearSegmentedColormap

See also

truncate_colormap

Keeps part of a colormap.

terrain_cmap

A colormap that needs no download.

Examples

Needs the internet:

>>> from lair.plotter import NCL_cmap
>>> cmap = NCL_cmap("WhiteBlueGreenYellowRed")