PyNGL Home > Functions > Color routines

Ngl.draw_colormap

Draws the current color map and advances the frame.

Prototype

Ngl.draw_colormap(wks)

Arguments

wks

The identifier returned from calling Ngl.open_wks.

Return value

   None

Description

This procedure draws the current color map assigned to the given workstation and advances the frame. The colors are drawn as filled boxes going from left to right, top to bottom.

The default rainbow color map can be changed by setting the wkColorMap resource, either when you call Ngl.open_wks, or by calling Ngl.set_values.

For a list of the available color maps, see the predefined color maps, or you can create your own.

See Also

Ngl.retrieve_colormap, Ngl.open_wks, Ngl.draw, Ngl.set_values

Examples

For a simple example of using Ngl.draw_colormap to draw the default color map, run the following Python script:

import Ngl

wks = Ngl.open_wks("x11","example")

Ngl.draw_colormap(wks)

Ngl.end()
For more examples, run the color1.py script (see frames 1 and 2).