8000 PRF: don't redo limit work · matplotlib/matplotlib@9e5ae7e · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e5ae7e

Browse files
committed
PRF: don't redo limit work
`autoscale_view` already looks at siblings, only call it once.
1 parent ef0dd78 commit 9e5ae7e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,10 +2677,11 @@ def set_xscale(self, value, **kwargs):
26772677
g = self.get_shared_x_axes()
26782678
for ax in g.get_siblings(self):
26792679
ax.xaxis._set_scale(value, **kwargs)
2680-
ax.autoscale_view(scaley=False)
26812680
ax._update_transScale()
26822681
ax.stale = True
26832682

2683+
self.autoscale_view(scaley=False)
2684+
26842685
def get_xticks(self, minor=False):
26852686
"""Return the x ticks as a list of locations"""
26862687
return self.xaxis.get_ticklocs(minor=minor)
@@ -2933,9 +2934,9 @@ def set_yscale(self, value, **kwargs):
29332934
g = self.get_shared_y_axes()
29342935
for ax in g.get_siblings(self):
29352936
ax.yaxis._set_scale(value, **kwargs)
2936-
ax.autoscale_view(scalex=False)
29372937
ax._update_transScale()
29382938
ax.stale = True
2939+
self.autoscale_view(scalex=False)
29392940

29402941
def get_yticks(self, minor=False):
29412942
"""Return the y tick 3799 s as a list of locations"""

0 commit comments

Comments
 (0)
0