pysteps.visualization.motionfields.streamplot¶
-
pysteps.visualization.motionfields.
streamplot
(UV, ax=None, geodata=None, axis='on', streamplot_kwargs=None, map_kwargs=None)¶ Function to plot a motion field as streamlines.
- Parameters
- UV: array-like
Array of shape (2, m,n) containing the input motion field.
- ax: axis object
Optional axis object to use for plotting.
- geodata: dictionary or None
Optional dictionary containing geographical information about the field. If geodata is not None, it must contain the following key-value pairs:
Key
Value
projection
PROJ.4-compatible projection definition
x1
x-coordinate of the lower-left corner of the data raster
y1
y-coordinate of the lower-left corner of the data raster
x2
x-coordinate of the upper-right corner of the data raster
y2
y-coordinate of the upper-right corner of the data raster
yorigin
a string specifying the location of the first element in the data raster w.r.t. y-axis: ‘upper’ = upper border, ‘lower’ = lower border
- axis: {‘off’,’on’}, optional
Whether to turn off or on the x and y axis.
- streamplot_kwargs: dict, optional
Optional dictionary containing keyword arguments for the streamplot method. See the documentation of matplotlib.pyplot.streamplot.
- Returns
- out: axis object
Figure axes. Needed if one wants to add e.g. text inside the plot.
- Other Parameters
- map_kwargs: dict
Optional parameters that need to be passed to
pysteps.visualization.basemaps.plot_geography()
.