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

Backport PR #18540 on branch v3.3.x (Call to ExitStack.push should have been ExitStack.callback.)#18545

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

Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletionlib/matplotlib/axes/_base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2774,7 +2774,7 @@ def redraw_in_frame(self):
with ExitStack() as stack:
for artist in [*self._get_axis_list(),
self.title, self._left_title, self._right_title]:
stack.push(artist.set_visible, artist.get_visible())
stack.callback(artist.set_visible, artist.get_visible())
artist.set_visible(False)
self.draw(self.figure._cachedRenderer)

Expand Down
7 changes: 7 additions & 0 deletionslib/matplotlib/tests/test_axes.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6350,6 +6350,13 @@ def test_bbox_aspect_axes_init():
assert_allclose(sizes, sizes[0])


def test_redraw_in_frame():
fig, ax = plt.subplots(1, 1)
ax.plot([1, 2, 3])
fig.canvas.draw()
ax.redraw_in_frame()


def test_invisible_axes():
# invisible axes should not respond to events...
fig, ax = plt.subplots()
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp