Draw streamlines of a vector flow. *x*, *y* : 1d arrays an *evenly spaced* grid. *u*, *v* : 2d arrays x and y-velocities. Number of rows should match length of y, and the number of columns should match x. *density* : float or 2-tuple Controls the closenes
(axes, 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')
| 17 | |
| 18 | |
| 19 | def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None, |
| 20 | cmap=None, norm=None, arrowsize=1, arrowstyle='-|>', |
| 21 | minlength=0.1, transform=None, zorder=None, start_points=None, |
| 22 | maxlength=4.0, integration_direction='both'): |
| 23 | """Draw streamlines of a vector flow. |
| 24 | |
| 25 | *x*, *y* : 1d arrays |
| 26 | an *evenly spaced* grid. |
| 27 | *u*, *v* : 2d arrays |
| 28 | x and y-velocities. Number of rows should match length of y, and |
| 29 | the number of columns should match x. |
| 30 | *density* : float or 2-tuple |
| 31 | Controls the closeness of streamlines. When `density = 1`, the domain |
| 32 | is divided into a 30x30 grid---*density* linearly scales this grid. |
| 33 | Each cell in the grid can have, at most, one traversing streamline. |
| 34 | For different densities in each direction, use [density_x, density_y]. |
| 35 | *linewidth* : numeric or 2d array |
| 36 | vary linewidth when given a 2d array with the same shape as velocities. |
| 37 | *color* : matplotlib color code, or 2d array |
| 38 | Streamline color. When given an array with the same shape as |
| 39 | velocities, *color* values are converted to colors using *cmap*. |
| 40 | *cmap* : :class:`~matplotlib.colors.Colormap` |
| 41 | Colormap used to plot streamlines and arrows. Only necessary when using |
| 42 | an array input for *color*. |
| 43 | *norm* : :class:`~matplotlib.colors.Normalize` |
| 44 | Normalize object used to scale luminance data to 0, 1. If None, stretch |
| 45 | (min, max) to (0, 1). Only necessary when *color* is an array. |
| 46 | *arrowsize* : float |
| 47 | Factor scale arrow size. |
| 48 | *arrowstyle* : str |
| 49 | Arrow style specification. |
| 50 | See :class:`~matplotlib.patches.FancyArrowPatch`. |
| 51 | *minlength* : float |
| 52 | Minimum length of streamline in axes coordinates. |
| 53 | *start_points*: Nx2 array |
| 54 | Coordinates of starting points for the streamlines. |
| 55 | In data coordinates, the same as the ``x`` and ``y`` arrays. |
| 56 | *zorder* : int |
| 57 | any number |
| 58 | *maxlength* : float |
| 59 | Maximum length of streamline in axes coordinates. |
| 60 | *integration_direction* : ['forward', 'backward', 'both'] |
| 61 | Integrate the streamline in forward, backward or both directions. |
| 62 | |
| 63 | Returns: |
| 64 | |
| 65 | *stream_container* : StreamplotSet |
| 66 | Container object with attributes |
| 67 | |
| 68 | - lines: `matplotlib.collections.LineCollection` of streamlines |
| 69 | |
| 70 | - arrows: collection of `matplotlib.patches.FancyArrowPatch` |
| 71 | objects representing arrows half-way along stream |
| 72 | lines. |
| 73 | |
| 74 | This container will probably change in the future to allow changes |
| 75 | to the colormap, alpha, etc. for both lines and arrows, but these |
| 76 | changes should be backward compatible. |
nothing calls this directly
no test coverage detected