Skip to content

Commit ac00e8d

Browse files
author
Manuel Jung
committed
conserve kwargs order.
1 parent e67ade8 commit ac00e8d

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4605,8 +4605,9 @@ def stackplot(self, x, *args, **kwargs):
46054605
label_namer=None)
46064606
def streamplot(self, x, y, u, v, density=1, linewidth=None, color=None,
46074607
cmap=None, norm=None, arrowsize=1, arrowstyle='-|>',
4608-
minlength=0.1, maxlength=4.0, transform=None, zorder=None,
4609-
start_points=None, integration_direction='both'):
4608+
minlength=0.1, transform=None, zorder=None,
4609+
start_points=None, maxlength=4.0,
4610+
integration_direction='both'):
46104611
if not self._hold:
46114612
self.cla()
46124613
stream_container = mstream.streamplot(
@@ -4619,11 +4620,11 @@ def streamplot(self, x, y, u, v, density=1, linewidth=None, color=None,
46194620
arrowsize=arrowsize,
46204621
arrowstyle=arrowstyle,
46214622
minlength=minlength,
4622-
maxlength=maxlength,
46234623
start_points=start_points,
46244624
transform=transform,
4625-
integration_direction=integration_direction,
4626-
zorder=zorder)
4625+
zorder=zorder,
4626+
maxlength=maxlength,
4627+
integration_direction=integration_direction)
46274628
return stream_container
46284629
streamplot.__doc__ = mstream.streamplot.__doc__
46294630

lib/matplotlib/streamplot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
2424
cmap=None, norm=None, arrowsize=1, arrowstyle='-|>',
25-
minlength=0.1, maxlength=4.0, transform=None, zorder=None,
26-
start_points=None, integration_direction='both'):
25+
minlength=0.1, transform=None, zorder=None, start_points=None,
26+
maxlength=4.0, integration_direction='both'):
2727
"""Draws streamlines of a vector flow.
2828
2929
*x*, *y* : 1d arrays
@@ -101,8 +101,8 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
101101
arrow_kw = dict(arrowstyle=arrowstyle, mutation_scale=10 * arrowsize)
102102

103103
if integration_direction not in ['both', 'forward', 'backward']:
104-
errstr = "Integration direction " \
105-
"'%s' not recognised." % integration_direction
104+
errstr = ("Integration direction '%s' not recognised." %
105+
integration_direction)
106106
errstr += "Expected 'both', 'forward' or 'backward'."
107107
raise ValueError(errstr)
108108

0 commit comments

Comments
 (0)