@@ -25,42 +25,47 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
25
25
26
26
Parameters
27
27
----------
28
- x, y : 1d arrays
28
+ x, y : 1D arrays
29
29
An evenly spaced grid.
30
- u, v : 2d arrays
31
- *x* and *y*-velocities. Number of rows should match length of *y*, and
32
- the number of columns should match *x*.
33
- density : float or 2-tuple
30
+ u, v : 2D arrays
31
+ *x* and *y*-velocities. The number of rows and columns must match
32
+ the length of *y* and *x*, respectively .
33
+ density : float or (float, float)
34
34
Controls the closeness of streamlines. When ``density = 1``, the domain
35
- is divided into a 30x30 grid--- *density* linearly scales this grid.
35
+ is divided into a 30x30 grid. *density* linearly scales this grid.
36
36
Each cell in the grid can have, at most, one traversing streamline.
37
- For different densities in each direction, use [density_x, density_y].
38
- linewidth : numeric or 2d array
39
- Vary linewidth when given a 2d array with the same shape as velocities.
40
- color : matplotlib color code, or 2d array
41
- Streamline color. When given an array with the same shape as
42
- velocities, *color* values are converted to colors using *cmap*.
37
+ For different densities in each direction, use a tuple
38
+ (density_x, density_y).
39
+ linewidth : float or 2D array
40
+ The width of the stream lines. With a 2D array the line width can be
41
+ varied across the grid. The array must have the same shape as *u*
42
+ and *v*.
43
+ color : matplotlib color code, or 2D array
44
+ The streamline color. If given an array, its values are converted to
45
+ colors using *cmap* and *norm*. The array must have the same shape
46
+ as *u* and *v*.
43
47
cmap : `~matplotlib.colors.Colormap`
44
- Colormap used to plot streamlines and arrows. Only necessary when using
45
- an array input for *color*.
48
+ Colormap used to plot streamlines and arrows. This is only used if
49
+ *color* is an array .
46
50
norm : `~matplotlib.colors.Normalize`
47
51
Normalize object used to scale luminance data to 0, 1. If ``None``,
48
- stretch (min, max) to (0, 1). Only necessary when *color* is an array.
52
+ stretch (min, max) to (0, 1). This is only used if *color* is an array.
49
53
arrowsize : float
50
- Factor scale arrow size.
54
+ Scaling factor for the arrow size.
51
55
arrowstyle : str
52
56
Arrow style specification.
53
57
See `~matplotlib.patches.FancyArrowPatch`.
54
58
minlength : float
55
59
Minimum length of streamline in axes coordinates.
56
60
start_points : Nx2 array
57
- Coordinates of starting points for the streamlines.
58
- In data coordinates, the same as the *x* and *y* arrays.
61
+ Coordinates of starting points for the streamlines in data coordinates
62
+ ( the same coordinates as the *x* and *y* arrays) .
59
63
zorder : int
60
- Any number.
64
+ The zorder of the stream lines and arrows.
65
+ Artists with lower zorder values are drawn first.
61
66
maxlength : float
62
67
Maximum length of streamline in axes coordinates.
63
- integration_direction : [ 'forward' | 'backward' | 'both']
68
+ integration_direction : { 'forward', 'backward', 'both'}
64
69
Integrate the streamline in forward, backward or both directions.
65
70
default is ``'both'``.
66
71
@@ -69,11 +74,10 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
69
74
stream_container : StreamplotSet
70
75
Container object with attributes
71
76
72
- - lines: `matplotlib.collections .LineCollection` of streamlines
77
+ - `` lines`` : `.LineCollection` of streamlines
73
78
74
- - arrows: collection of `matplotlib.patches.FancyArrowPatch`
75
- objects representing arrows half-way along stream
76
- lines.
79
+ - ``arrows``: `.PatchCollection` containing `.FancyArrowPatch`
80
+ objects representing the arrows half-way along stream lines.
77
81
78
82
This container will probably change in the future to allow changes
79
83
to the colormap, alpha, etc. for both lines and arrows, but these
0 commit comments