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.
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].Colormap
Normalize
FancyArrowPatch
.x
and y
arrays.Returns:
- stream_container : StreamplotSet
Container object with attributes
- lines:
matplotlib.collections.LineCollection
of streamlines- arrows: collection of
matplotlib.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
¶