Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita63463f

Browse files
authored
Merge pull request#7188 from bcongdon/streamplot-zorder
MNT: Remove hard-coded streamplot zorder kwarg
2 parents9df6829 +55ce380 commita63463f

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Streamplot Zorder Keyword Argument Changes
2+
------------------------------------------
3+
4+
The ``zorder`` parameter for:func:`streamplot` now has default
5+
value of ``None`` instead of ``2``. If ``None`` is given as ``zorder``,
6+
:func:`streamplot` has a default ``zorder`` of
7+
``matplotlib.lines.Line2D.zorder``.

‎lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4610,7 +4610,8 @@ def stackplot(self, x, *args, **kwargs):
46104610
label_namer=None)
46114611
defstreamplot(self,x,y,u,v,density=1,linewidth=None,color=None,
46124612
cmap=None,norm=None,arrowsize=1,arrowstyle='-|>',
4613-
minlength=0.1,transform=None,zorder=2,start_points=None):
4613+
minlength=0.1,transform=None,zorder=None,
4614+
start_points=None):
46144615
ifnotself._hold:
46154616
self.cla()
46164617
stream_container=mstream.streamplot(self,x,y,u,v,

‎lib/matplotlib/streamplot.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
importmatplotlib.cmascm
1414
importmatplotlib.colorsasmcolors
1515
importmatplotlib.collectionsasmcollections
16+
importmatplotlib.linesasmlines
1617
importmatplotlib.patchesaspatches
1718

1819

@@ -21,7 +22,7 @@
2122

2223
defstreamplot(axes,x,y,u,v,density=1,linewidth=None,color=None,
2324
cmap=None,norm=None,arrowsize=1,arrowstyle='-|>',
24-
minlength=0.1,transform=None,zorder=2,start_points=None):
25+
minlength=0.1,transform=None,zorder=None,start_points=None):
2526
"""Draws streamlines of a vector flow.
2627
2728
*x*, *y* : 1d arrays
@@ -78,6 +79,9 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
7879
mask=StreamMask(density)
7980
dmap=DomainMap(grid,mask)
8081

82+
ifzorderisNone:
83+
zorder=mlines.Line2D.zorder
84+
8185
# default to data coordinates
8286
iftransformisNone:
8387
transform=axes.transData

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp