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

Commitf5c9e19

Browse files
authored
Merge pull request#17609 from tacaswell/auto-backport-of-pr-17602-on-v3.2.x
Backport PR#17602: FIX: propagate _is_saving state when changing can…
2 parents889c73f +6afbad4 commitf5c9e19

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

‎lib/matplotlib/backend_bases.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2068,8 +2068,9 @@ def print_figure(self, filename, dpi=None, facecolor=None, edgecolor=None,
20682068
# Some code (e.g. Figure.show) differentiates between having *no*
20692069
# manager and a *None* manager, which should be fixed at some point,
20702070
# but this should be fine.
2071-
withcbook._setattr_cm(self,_is_saving=True,manager=None), \
2072-
cbook._setattr_cm(self.figure,dpi=dpi):
2071+
withcbook._setattr_cm(self,manager=None), \
2072+
cbook._setattr_cm(self.figure,dpi=dpi), \
2073+
cbook._setattr_cm(canvas,_is_saving=True):
20732074

20742075
iffacecolorisNone:
20752076
facecolor=rcParams['savefig.facecolor']

‎lib/matplotlib/tests/test_figure.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,3 +487,12 @@ def test_removed_axis():
487487
fig,axs=plt.subplots(2,sharex=True)
488488
axs[0].remove()
489489
fig.canvas.draw()
490+
491+
492+
@check_figures_equal(extensions=["svg","pdf","eps","png"])
493+
deftest_animated_with_canvas_change(fig_test,fig_ref):
494+
ax_ref=fig_ref.subplots()
495+
ax_ref.plot(range(5))
496+
497+
ax_test=fig_test.subplots()
498+
ax_test.plot(range(5),animated=True)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp