Axes.
barbs
(*args, data=None, **kw)[source]¶Plot a 2D field of barbs.
Call signature:
barbs([X, Y], U, V, [C], **kw)
Where X, Y define the barb locations, U, V define the barb directions, and C optionally sets the color.
All arguments may be 1D or 2D. U, V, C may be masked arrays, but masked X, Y are not supported at present.
Barbs are traditionally used in meteorology as a way to plot the speed and direction of wind observations, but can technically be used to plot any two dimensional vector quantity. As opposed to arrows, which give vector magnitude by the length of the arrow, the barbs give more quantitative information about the vector magnitude by putting slanted lines or a triangle for various increments in magnitude, as show schematically below:
: /\ \
: / \ \
: / \ \ \
: / \ \ \
: ------------------------------
The largest increment is given by a triangle (or "flag"). After those come full lines (barbs). The smallest increment is a half line. There is only, of course, ever at most 1 half line. If the magnitude is small and only needs a single half-line and no full lines or triangles, the half-line is offset from the end of the barb so that it can be easily distinguished from barbs with a single full line. The magnitude for the barb shown above would nominally be 65, using the standard increments of 50, 10, and 5.
See also https://en.wikipedia.org/wiki/Wind_barb.
Parameters: | X, Y : 1D or 2D array-like, optional
U, V : 1D or 2D array-like
C : 1D or 2D array-like, optional
length : float, default: 7
pivot : {'tip', 'middle'} or float, default: 'tip'
barbcolor : color or color sequence
flagcolor : color or color sequence
sizes : dict, optional
fill_empty : bool, default: False
rounding : bool, default: True
barb_increments : dict, optional
flip_barb : bool or array-like of bool, default: False
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns: | barbs : |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Other Parameters: | **kwargs
|
Notes
Note
In addition to the above described arguments, this function can take a data keyword argument. If such a data argument is given, the following arguments are replaced by data[<arg>]:
Objects passed as data must support item access (data[<arg>]
) and
membership test (<arg> in data
).