Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 122b256

Browse files
committed
Inline some kwargs.
1 parent 38ee431 commit 122b256

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,9 +1727,9 @@ def loglog(self, *args, **kwargs):
17271727
All parameters supported by `.plot`.
17281728
"""
17291729
dx = {k: kwargs.pop(k) for k in ['basex', 'subsx', 'nonposx']
1730-
if k in kwargs}
1730+
if k in kwargs}
17311731
dy = {k: kwargs.pop(k) for k in ['basey', 'subsy', 'nonposy']
1732-
if k in kwargs}
1732+
if k in kwargs}
17331733

17341734
self.set_xscale('log', **dx)
17351735
self.set_yscale('log', **dy)
@@ -1780,7 +1780,7 @@ def semilogx(self, *args, **kwargs):
17801780
All parameters supported by `.plot`.
17811781
"""
17821782
d = {k: kwargs.pop(k) for k in ['basex', 'subsx', 'nonposx']
1783-
if k in kwargs}
1783+
if k in kwargs}
17841784

17851785
self.set_xscale('log', **d)
17861786
l = self.plot(*args, **kwargs)

lib/matplotlib/colorbar.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,8 +1487,6 @@ def _add_solids(self, X, Y, C):
14871487
Draw the colors using :class:`~matplotlib.patches.Patch`;
14881488
optionally add separators.
14891489
"""
1490-
kw = {'alpha': self.alpha, }
1491-
14921490
n_segments = len(C)
14931491

14941492
# ensure there are sufficient hatches
@@ -1511,7 +1509,7 @@ def _add_solids(self, X, Y, C):
15111509
patch = mpatches.PathPatch(mpath.Path(xy),
15121510
facecolor=self.cmap(self.norm(val)),
15131511
hatch=hatch, linewidth=0,
1514-
antialiased=False, **kw)
1512+
antialiased=False, alpha=self.alpha)
15151513
self.ax.add_patch(patch)
15161514
patches.append(patch)
15171515

lib/mpl_toolkits/axes_grid1/colorbar.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -531,14 +531,13 @@ def _add_solids(self, X, Y, C):
531531
args = (X, Y, C)
532532
else:
533533
args = (np.transpose(Y), np.transpose(X), np.transpose(C))
534-
kw = {'cmap': self.cmap, 'norm': self.norm,
535-
'shading': 'flat', 'alpha': self.alpha,
536-
}
537534

538535
del self.solids
539536
del self.dividers
540537

541-
col = self.ax.pcolormesh(*args, **kw)
538+
col = self.ax.pcolormesh(
539+
*args,
540+
cmap=self.cmap, norm=self.norm, shading='flat', alpha=self.alpha)
542541

543542
self.solids = col
544543
if self.drawedges:

0 commit comments

Comments
 (0)