Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 57c14f7 + 2a53a90 commit 037f25cCopy full SHA for 037f25c
3 files changed
lib/matplotlib/axes/_axes.py
@@ -3811,7 +3811,7 @@ def stackplot(self, x, *args, **kwargs):
3811
3812
def streamplot(self, x, y, u, v, density=1, linewidth=None, color=None,
3813
cmap=None, norm=None, arrowsize=1, arrowstyle='-|>',
3814
- minlength=0.1, transform=None):
+ minlength=0.1, transform=None, zorder=1):
3815
if not self._hold:
3816
self.cla()
3817
stream_container = mstream.streamplot(self, x, y, u, v,
@@ -3823,7 +3823,8 @@ def streamplot(self, x, y, u, v, density=1, linewidth=None, color=None,
3823
arrowsize=arrowsize,
3824
arrowstyle=arrowstyle,
3825
minlength=minlength,
3826
- transform=transform)
+ transform=transform,
3827
+ zorder=zorder)
3828
return stream_container
3829
streamplot.__doc__ = mstream.streamplot.__doc__
3830
lib/matplotlib/pyplot.py
@@ -3213,7 +3213,7 @@ def step(x, y, *args, **kwargs):
3213
@_autogen_docstring(Axes.streamplot)
3214
def streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None,
3215
norm=None, arrowsize=1, arrowstyle='-|>', minlength=0.1,
3216
- transform=None, hold=None):
+ transform=None, hold=None, zorder=1):
3217
ax = gca()
3218
# allow callers to override the hold state by passing hold=True|False
3219
washold = ax.ishold()
@@ -3224,7 +3224,8 @@ def streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None,
3224
ret = ax.streamplot(x, y, u, v, density=density, linewidth=linewidth,
3225
color=color, cmap=cmap, norm=norm,
3226
arrowsize=arrowsize, arrowstyle=arrowstyle,
3227
- minlength=minlength, transform=transform)
+ minlength=minlength, transform=transform,
3228
3229
draw_if_interactive()
3230
finally:
3231
ax.hold(washold)
lib/matplotlib/streamplot.py
@@ -16,7 +16,7 @@
16
17
def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
18
19
20
"""Draws streamlines of a vector flow.
21
22
*x*, *y* : 1d arrays
@@ -47,6 +47,8 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
47
See :class:`~matplotlib.patches.FancyArrowPatch`.
48
*minlength* : float
49
Minimum length of streamline in axes coordinates.
50
+ *zorder* : int
51
+ any number
52
53
Returns:
54
@@ -98,6 +100,9 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
98
100
line_kw['linewidth'] = linewidth
99
101
arrow_kw['linewidth'] = linewidth
102
103
+ line_kw['zorder'] = zorder
104
+ arrow_kw['zorder'] = zorder
105
+
106
## Sanity checks.
107
assert u.shape == grid.shape
108
assert v.shape == grid.shape
0 commit comments