Ngl.wmbarb
Draws wind barbs at specified locations.
Prototype
Ngl.wmbarb(wks, x, y, dx, dy)
Arguments
wksThe identifier returned from calling Ngl.open_wks.
x, yScalars, one-dimensional NumPy arrays or Python lists specifying X and Y coordinate values.
dx, dyScalars, one-dimensional NumPy arrays or Python lists specifying X and Y components of wind vectors at the associated (x,y) coordinates.
Return value
NoneDescription
This procedure draws wind barbs.
If you want to draw wind barbs over a map that are defined on gridded data, then you could use an Ngl.vector plot with vcGlyphStyle set to "WindBarb". If you want to draw wind barbs over a map that are defined on non-gridded data, then use Ngl.wmbarbmap.
For the purposes of more fully explaining the arguments in the above, the end of a wind barb where the barbs are drawn will be called the feather end of the barb, and the opposite end will be called the tip. Using this terminology, the tip of a wind barb will be at coordinate (x,y), and the feather end will be at a point (y+s*dx,y+s*dy), where "s" is a positive scale factor chosen by the procedure to make the wind barb a standard length. The value of sqrt(dx**2+dy**2) determines the wind speed to use in drawing the barbs. The length of the shaft of the wind barb is controlled by the value of the internal parameter WBS (see below for how to change the value of WBS). The length of the shaft has no relation to the wind speed.
For example, since by convention the feather end of a wind barb points in the direction where the wind is coming from, to draw a wind barb that indicates a wind coming from the north at 20 knots with tip at (0.5, 0.5), you would make the call:
Ngl.wmbarb(wid, 0.5, 0.5, 0., 20.)To shift the direction of how the wind barbs are drawn by 180 degrees, set the control parameter WDF to 1.
The procedure Ngl.wmsetp is used to set parameter values, and the function Ngl.wmgetp is used to retrieve parameter values. The parameters applicable to Ngl.wmbarb are: COL, EZF, WBF, WDF, WBA, WBC, WBD, WBS, WBT.
The procedure Ngl.wmbarb does not call Ngl.frame.
See Also
Ngl.wmbarbmap, Ngl.wmgetp, Ngl.wmsetp, Ngl.wmstnm
special resources: nglDraw, nglFrame, nglMaximize, nglScale
Examples
Examples
See wmbarb.py (and its output) and wmstnm02.py (and its output).