Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9e5ae7e

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

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎lib/matplotlib/axes/_base.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.py
+3-2Lines 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 ticks as a list of locations"""

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.