Skip to content

Commit 641aa50

Browse files
committed
Eliminate unused variables in axes3d
1 parent 3db8149 commit 641aa50

File tree

3 files changed

+8
-18
lines changed

3 files changed

+8
-18
lines changed

doc/api/next_api_changes/2018-04-22-ZHD.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Different exception types for undocumented options
22
--------------------------------------------------
33

4+
- Passing ``style='comma'`` to :meth:`~matplotlib.axes.Axes.ticklabel_format`
5+
was never supported. It now raises ``ValueError`` like all other
6+
unsupported styles, rather than ``NotImplementedError``.
7+
48
- Passing the undocumented ``xmin`` or ``xmax`` arguments to
59
:meth:`~matplotlib.axes.Axes.set_xlim` would silently override the ``left``
610
and ``right`` arguments. :meth:`~matplotlib.axes.Axes.set_ylim` and the

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: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,7 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True,
536536
_tight = self._tight = bool(tight)
537537

538538
if scalex and self._autoscaleXon:
539-
xshared = self._shared_x_axes.get_siblings(self)
540-
dl = [ax.dataLim for ax in xshared]
541-
bb = mtransforms.BboxBase.union(dl)
539+
self._shared_x_axes.clean()
542540
x0, x1 = self.xy_dataLim.intervalx
543541
xlocator = self.xaxis.get_major_locator()
544542
try:
@@ -555,9 +553,7 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True,
555553
self.set_xbound(x0, x1)
556554

557555
if scaley and self._autoscaleYon:
558-
yshared = self._shared_y_axes.get_siblings(self)
559-
dl = [ax.dataLim for ax in yshared]
560-
bb = mtransforms.BboxBase.union(dl)
556+
self._shared_y_axes.clean()
561557
y0, y1 = self.xy_dataLim.intervaly
562558
ylocator = self.yaxis.get_major_locator()
563559
try:
@@ -574,9 +570,7 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True,
574570
self.set_ybound(y0, y1)
575571

576572
if scalez and self._autoscaleZon:
577-
zshared = self._shared_z_axes.get_siblings(self)
578-
dl = [ax.dataLim for ax in zshared]
579-
bb = mtransforms.BboxBase.union(dl)
573+
self._shared_z_axes.clean()
580574
z0, z1 = self.zz_dataLim.intervalx
581575
zlocator = self.zaxis.get_major_locator()
582576
try:
@@ -1370,13 +1364,8 @@ def ticklabel_format(
13701364
raise ValueError("scilimits must be a sequence of 2 integers")
13711365
if style[:3] == 'sci':
13721366
sb = True
1373-
elif style in ['plain', 'comma']:
1367+
elif style == 'plain':
13741368
sb = False
1375-
if style == 'plain':
1376-
cb = False
1377-
else:
1378-
cb = True
1379-
raise NotImplementedError("comma style remains to be added")
13801369
elif style == '':
13811370
sb = None
13821371
else:
@@ -1724,7 +1713,6 @@ def plot_surface(self, X, Y, Z, *args, norm=None, vmin=None,
17241713
# The construction leaves the array with duplicate points, which
17251714
# are removed here.
17261715
ps = list(zip(*ps))
1727-
lastp = np.array([])
17281716
ps2 = [ps[0]] + [ps[i] for i in range(1, len(ps)) if ps[i] != ps[i-1]]
17291717
avgzsum = sum(p[2] for p in ps2)
17301718
polys.append(ps2)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy