Ngl.vector_scalar_map
Creates and draws vectors, colored by a scalar field, over a map.
Prototype
vsmap = Ngl.vector_scalar_map(wks, u, v, data, res=None)
Arguments
wksThe identifier returned from calling Ngl.open_wks.
u, vThe U and V components of the vectors. u and v should be two-dimensional NumPy arrays or NumPy masked arrays (dimensioned ny x nx).
dataThe scalar data field for coloring the vectors. data should be a two-dimensional NumPy or NumPy masked array (dimensioned ny x nx).
res=NoneAn (optional) instance of the Resources class having PyNGL resources as attributes.
Return value
vsmapA PlotId representing the map created.
Description
This function creates and draws vectors, colored by a scalar field, over a map on the given workstation and advances the frame. Plot options can be set via the res variable.
In order to overlay vectors on a map plot, you must tell the vector plot (and the scalar field) where on the map it is being overlaid (in latitude/longitude degrees). You can do this via the array resources vfXArray (sfXArray) and vfYArray (sfYArray), or the vfXCStartV (sfXCStartV), vfXCEndV (sfXCEndV), vfYCStartV (sfYCStartV), vfYCEndV (sfYCEndV) resources.
As of version 1.3.0, if u, v, and/or data are masked arrays, then any values equal to the corresponding fill values will not be plotted. If u, v, and/or data are not masked arrays and they contain missing values, then set the resources vfMissingUValueV, vfMissingVValueV, and/or sfMissingValueV 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.vector_scalar, Ngl.vector, Ngl.vector_map, Ngl.streamline, Ngl.streamline_map,
MapPlot resources
VectorPlot resources
ContourPlot resources
VectorField resources
ScalarField resources
LabelBar resources
Title resources
TickMark resources
Transformation resources
View resources
Transform resources
PlotManager resources
Special "ngl" resources
Examples