@@ -20,61 +20,64 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
20
20
cmap = None , norm = None , arrowsize = 1 , arrowstyle = '-|>' ,
21
21
minlength = 0.1 , transform = None , zorder = None , start_points = None ,
22
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
23
+ """
24
+ Draw streamlines of a vector flow.
25
+
26
+ Parameters
27
+ ----------
28
+ x, y : 1d arrays
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
34
+ Controls the closeness of streamlines. When ``density = 1``, the domain
32
35
is divided into a 30x30 grid---*density* linearly scales this grid.
33
36
Each cell in the grid can have, at most, one traversing streamline.
34
37
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
+ 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
38
41
Streamline color. When given an array with the same shape as
39
42
velocities, *color* values are converted to colors using *cmap*.
40
- * cmap* : :class: `~matplotlib.colors.Colormap`
43
+ cmap : `~matplotlib.colors.Colormap`
41
44
Colormap used to plot streamlines and arrows. Only necessary when using
42
45
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
46
+ norm : `~matplotlib.colors.Normalize`
47
+ 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.
49
+ arrowsize : float
47
50
Factor scale arrow size.
48
- * arrowstyle* : str
51
+ arrowstyle : str
49
52
Arrow style specification.
50
- See :class: `~matplotlib.patches.FancyArrowPatch`.
51
- * minlength* : float
53
+ See `~matplotlib.patches.FancyArrowPatch`.
54
+ minlength : float
52
55
Minimum length of streamline in axes coordinates.
53
- * start_points* : Nx2 array
56
+ start_points : Nx2 array
54
57
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
58
+ In data coordinates, the same as the *x* and *y* arrays.
59
+ zorder : int
60
+ Any number.
61
+ maxlength : float
59
62
Maximum length of streamline in axes coordinates.
60
- * integration_direction* : ['forward', 'backward', 'both']
63
+ integration_direction : ['forward' | 'backward' | 'both']
61
64
Integrate the streamline in forward, backward or both directions.
65
+ default is ``'both'``.
62
66
63
- Returns:
64
-
65
- *stream_container* : StreamplotSet
66
- Container object with attributes
67
-
68
- - lines: `matplotlib.collections.LineCollection` of streamlines
67
+ Returns
68
+ -------
69
+ stream_container : StreamplotSet
70
+ Container object with attributes
69
71
70
- - arrows: collection of `matplotlib.patches.FancyArrowPatch`
71
- objects representing arrows half-way along stream
72
- lines.
72
+ - lines: `matplotlib.collections.LineCollection` of streamlines
73
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 .
74
+ - arrows: collection of `matplotlib.patches.FancyArrowPatch`
75
+ objects representing arrows half-way along stream
76
+ lines .
77
77
78
+ This container will probably change in the future to allow changes
79
+ to the colormap, alpha, etc. for both lines and arrows, but these
80
+ changes should be backward compatible.
78
81
"""
79
82
grid = Grid (x , y )
80
83
mask = StreamMask (density )
0 commit comments