Ngl.define_colormap
Defines a new color map for the given workstation.
Available in version 1.2.0 or later.
Prototype
Ngl.define_colormap(wks,cmap)
Arguments
wksThe identifier returned from calling Ngl.open_wks.
cmapA predefined color map name, a NumPy array of n x 3 RGB values, or a list of named colors.
Return value
NoneDescription
This procedure defines a new color map for the given workstation. The color map can be a predefined color map name, a NumPy array of n x 3 RGB values, or a list of named colors.
See Also
Ngl.draw_colormap, Ngl.merge_colormaps, Ngl.retrieve_colormap, Ngl.open_wks, Ngl.draw, Ngl.set_values
Examples
For a simple example of using Ngl.define_colormap to draw the "temp1" color map, run the following Python script:
import Ngl wks = Ngl.open_wks("x11","example") Ngl.define_colormap(wks,"temp1") Ngl.draw_colormap(wks) Ngl.end()For more examples, run the multi_plot.py script (see frame 1).