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

Skip to content

Commit 1ea943f

Browse files
committed
Eliminate unused variables in axes3d
1 parent d136257 commit 1ea943f

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2744,8 +2744,6 @@ def ticklabel_format(self, *, axis='both', style='', scilimits=None,
27442744
sb = True
27452745
elif style == 'plain':
27462746
sb = False
2747-
elif style == 'comma':
2748-
raise NotImplementedError("comma style remains to be added")
27492747
elif style == '':
27502748
sb = None
27512749
else:

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,6 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True,
539539
_tight = self._tight = bool(tight)
540540

541541
if scalex and self._autoscaleXon:
542-
xshared = self._shared_x_axes.get_siblings(self)
543-
dl = [ax.dataLim for ax in xshared]
544-
bb = mtransforms.BboxBase.union(dl)
545542
x0, x1 = self.xy_dataLim.intervalx
546543
xlocator = self.xaxis.get_major_locator()
547544
try:
@@ -558,9 +555,6 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True,
558555
self.set_xbound(x0, x1)
559556

560557
if scaley and self._autoscaleYon:
561-
yshared = self._shared_y_axes.get_siblings(self)
562-
dl = [ax.dataLim for ax in yshared]
563-
bb = mtransforms.BboxBase.union(dl)
564558
y0, y1 = self.xy_dataLim.intervaly
565559
ylocator = self.yaxis.get_major_locator()
566560
try:
@@ -577,9 +571,6 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True,
577571
self.set_ybound(y0, y1)
578572

579573
if scalez and self._autoscaleZon:
580-
zshared = self._shared_z_axes.get_siblings(self)
581-
dl = [ax.dataLim for ax in zshared]
582-
bb = mtransforms.BboxBase.union(dl)
583574
z0, z1 = self.zz_dataLim.intervalx
584575
zlocator = self.zaxis.get_major_locator()
585576
try:
@@ -1361,13 +1352,8 @@ def ticklabel_format(
13611352
raise ValueError("scilimits must be a sequence of 2 integers")
13621353
if style[:3] == 'sci':
13631354
sb = True
1364-
elif style in ['plain', 'comma']:
1355+
elif style == 'plain':
13651356
sb = False
1366-
if style == 'plain':
1367-
cb = False
1368-
else:
1369-
cb = True
1370-
raise NotImplementedError("comma style remains to be added")
13711357
elif style == '':
13721358
sb = None
13731359
else:
@@ -1684,7 +1670,6 @@ def plot_surface(self, X, Y, Z, *args, **kwargs):
16841670
norm = kwargs.pop('norm', None)
16851671
vmin = kwargs.pop('vmin', None)
16861672
vmax = kwargs.pop('vmax', None)
1687-
linewidth = kwargs.get('linewidth', None)
16881673
shade = kwargs.pop('shade', cmap is None)
16891674
lightsource = kwargs.pop('lightsource', None)
16901675

@@ -1720,7 +1705,6 @@ def plot_surface(self, X, Y, Z, *args, **kwargs):
17201705
# The construction leaves the array with duplicate points, which
17211706
# are removed here.
17221707
ps = list(zip(*ps))
1723-
lastp = np.array([])
17241708
ps2 = [ps[0]] + [ps[i] for i in range(1, len(ps)) if ps[i] != ps[i-1]]
17251709
avgzsum = sum(p[2] for p in ps2)
17261710
polys.append(ps2)

0 commit comments

Comments
 (0)