Skip to content

Commit f959d45

Browse files
committed
inverting an axis shouldn't affect the autoscaling setting
1 parent b2a7195 commit f959d45

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/matplotlib/axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,7 +2421,7 @@ def set_axis_bgcolor(self, color):
24212421
def invert_xaxis(self):
24222422
"Invert the x-axis."
24232423
left, right = self.get_xlim()
2424-
self.set_xlim(right, left)
2424+
self.set_xlim(right, left, auto=None)
24252425

24262426
def xaxis_inverted(self):
24272427
"""Returns *True* if the x-axis is inverted."""
@@ -2641,7 +2641,7 @@ def set_xticklabels(self, labels, fontdict=None, minor=False, **kwargs):
26412641
def invert_yaxis(self):
26422642
"Invert the y-axis."
26432643
bottom, top = self.get_ylim()
2644-
self.set_ylim(top, bottom)
2644+
self.set_ylim(top, bottom, auto=None)
26452645

26462646
def yaxis_inverted(self):
26472647
"""Returns *True* if the y-axis is inverted."""

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,7 @@ def invert_zaxis(self):
13891389
This function was added, but not tested. Please report any bugs.
13901390
"""
13911391
bottom, top = self.get_zlim()
1392-
self.set_zlim(top, bottom)
1392+
self.set_zlim(top, bottom, auto=None)
13931393

13941394
def zaxis_inverted(self):
13951395
'''

0 commit comments

Comments
 (0)