Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Fix issue with shared x-axis resetting when calling cla() on shared axes#28697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
Closed
Changes fromall 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
7 changes: 7 additions & 0 deletionslib/matplotlib/axes/_base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1234,6 +1234,9 @@ 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
# Ensure bidirectional sharing
other._shared_axes["x"].join(other, self)
other._sharex = self

def sharey(self, other):
"""
Expand All@@ -1253,6 +1256,9 @@ 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
# Ensure bidirectional sharing
other._shared_axes["y"].join(other, self)
other._sharey = self

def __clear(self):
"""Clear the Axes."""
Expand DownExpand Up@@ -1371,6 +1377,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

[8]ページ先頭

©2009-2025 Movatter.jp