Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/matplotlib/axes/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1233,6 +1233,8 @@ def sharex(self, other):
x0, x1 = other.get_xlim()
self.set_xlim(x0, x1, emit=False, auto=other.get_autoscalex_on())
self.xaxis._scale = other.xaxis._scale
other._shared_axes["x"].join(other, self)
other._sharex = self

def sharey(self, other):
"""
Expand All @@ -1252,6 +1254,8 @@ def sharey(self, other):
y0, y1 = other.get_ylim()
self.set_ylim(y0, y1, emit=False, auto=other.get_autoscaley_on())
self.yaxis._scale = other.yaxis._scale
other._shared_axes["y"].join(other, self)
other._sharey = self

def __clear(self):
"""Clear the Axes."""
Expand Down Expand Up @@ -1370,6 +1374,7 @@ def __clear(self):
share = getattr(self, f"_share{name}")
if share is not None:
getattr(self, f"share{name}")(share)
axis.set_inverted(False)
else:
# Although the scale was set to linear as part of clear,
# polar requires that _set_scale is called again
Expand Down
Loading