matplotlib.pyplot.streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None, norm=None, arrowsize=1, arrowstyle='-|>', minlength=0.1, transform=None, zorder=None, start_points=None, maxlength=4.0, integration_direction='both', *, data=None)
[source]
Draw streamlines of a vector flow.
x, y : 1d arrays
u, v : 2d arrays
density : float or 2-tuple
density = 1
, the domain is divided into a 30x30 grid---density linearly scales this grid. Each cell in the grid can have, at most, one traversing streamline. For different densities in each direction, use [density_x, density_y].linewidth : numeric or 2d array
color : matplotlib color code, or 2d array
cmap : Colormap
norm : Normalize
arrowsize : float
arrowstyle : str
FancyArrowPatch
.minlength : float
x
and y
arrays.zorder : int
maxlength : float
integration_direction : ['forward', 'backward', 'both']
Returns:
stream_container : StreamplotSet
Container object with attributes
matplotlib.collections.LineCollection
of streamlinesmatplotlib.patches.FancyArrowPatch
objects representing arrows half-way along stream lines.This container will probably change in the future to allow changes to the colormap, alpha, etc. for both lines and arrows, but these changes should be backward compatible.
matplotlib.pyplot.streamplot
© 2012–2018 Matplotlib Development Team. All rights reserved.
Licensed under the Matplotlib License Agreement.
https://matplotlib.org/3.0.0/api/_as_gen/matplotlib.pyplot.streamplot.html