PyNGL Home > Functions > Graphics routines

Ngl.streamline_map

Creates and draws a streamline plot over a map.

Prototype

map = Ngl.streamline_map(wks, u, v, res=None)

Arguments

wks

The identifier returned from calling Ngl.open_wks.

u, v

The U and V components of the streamlines. u and v should be two-dimensional NumPy arrays or NumPy masked arrays (dimensioned ny x nx).

res=None

An (optional) instance of the Resources class having PyNGL resources as attributes.

Return value

map

A PlotId representing the streamline created.

Description

This function creates and draws streamlines over a map on the given workstation and advances the frame. Plot options can be set via the res variable.

In order to overlay streamlines on a map plot, you must tell the streamline plot where on the map it is being overlaid (in latitude/longitude degrees). You can do this via the vfXArray/vfYArray resources, or the vfXCStartV/vfXCEndV/vfYCStartV/vfYCEndV resources.

As of version 1.3.0, if u and/or v are masked arrays, then any values equal to the corresponding fill values will not be plotted. If u and/or v are not masked arrays and they contain missing values, then set the resources vfMissingUValueV and/or vfMissingVValueV to these values.

Note that PyNGL internally sets some resources for you, depending on how other resources are set. See the list of default settings for more information.

See Also

Ngl.streamline, Ngl.streamline_scalar, Ngl.streamline_scalar_map, Ngl.vector, Ngl.vector_scalar, Ngl.vector_map, Ngl.vector_scalar_map

MapPlot resources
StreamlinePlot resources
VectorField resources
Title resources
TickMark resources
Transformation resources
View resources
Transform resources
PlotManager resources
Special "ngl" resources

Examples

See streamline.py (output).