Skip to content

Commit d43b0fe

Browse files
committed
Eliminate unused variables in axes3d
1 parent d628321 commit d43b0fe

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
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: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,7 @@ 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)
542+
self._shared_x_axes.clean()
545543
x0, x1 = self.xy_dataLim.intervalx
546544
xlocator = self.xaxis.get_major_locator()
547545
try:
@@ -558,9 +556,7 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True,
558556
self.set_xbound(x0, x1)
559557

560558
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)
559+
self._shared_y_axes.clean()
564560
y0, y1 = self.xy_dataLim.intervaly
565561
ylocator = self.yaxis.get_major_locator()
566562
try:
@@ -577,9 +573,7 @@ def autoscale_view(self, tight=None, scalex=True, scaley=True,
577573
self.set_ybound(y0, y1)
578574

579575
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)
576+
self._shared_z_axes.clean()
583577
z0, z1 = self.zz_dataLim.intervalx
584578
zlocator = self.zaxis.get_major_locator()
585579
try:
@@ -1373,13 +1367,8 @@ def ticklabel_format(
13731367
raise ValueError("scilimits must be a sequence of 2 integers")
13741368
if style[:3] == 'sci':
13751369
sb = True
1376-
elif style in ['plain', 'comma']:
1370+
elif style == 'plain':
13771371
sb = False
1378-
if style == 'plain':
1379-
cb = False
1380-
else:
1381-
cb = True
1382-
raise NotImplementedError("comma style remains to be added")
13831372
elif style == '':
13841373
sb = None
13851374
else:
@@ -1696,7 +1685,6 @@ def plot_surface(self, X, Y, Z, *args, **kwargs):
16961685
norm = kwargs.pop('norm', None)
16971686
vmin = kwargs.pop('vmin', None)
16981687
vmax = kwargs.pop('vmax', None)
1699-
linewidth = kwargs.get('linewidth', None)
17001688
shade = kwargs.pop('shade', cmap is None)
17011689
lightsource = kwargs.pop('lightsource', None)
17021690

@@ -1732,7 +1720,6 @@ def plot_surface(self, X, Y, Z, *args, **kwargs):
17321720
# The construction leaves the array with duplicate points, which
17331721
# are removed here.
17341722
ps = list(zip(*ps))
1735-
lastp = np.array([])
17361723
ps2 = [ps[0]] + [ps[i] for i in range(1, len(ps)) if ps[i] != ps[i-1]]
17371724
avgzsum = sum(p[2] for p in ps2)
17381725
polys.append(ps2)
@@ -2005,9 +1992,8 @@ def plot_trisurf(self, *args, **kwargs):
20051992
norm = kwargs.pop('norm', None)
20061993
vmin = kwargs.pop('vmin', None)
20071994
vmax = kwargs.pop('vmax', None)
2008-
linewidth = kwargs.get('linewidth', None)
20091995
shade = kwargs.pop('shade', cmap is None)
2010-
lightsource = kwargs.pop('lightsource', None)
1996+
kwargs.pop('lightsource', None)
20111997

20121998
tri, args, kwargs = Triangulation.get_from_args_and_kwargs(*args, **kwargs)
20131999
if 'Z' in kwargs:

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