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

Appearance settings

Commit 728db55

Browse filesBrowse files
committed
Only call init function at the begining of a save when user supplied
If a user supplied function is given it is probably needed to restart the animation. The default just inserts the first frame and restarts the animation which is not useful. Fixes #5399
1 parent e6c6c00 commit 728db55
Copy full SHA for 728db55

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,8 @@ def save(self, filename, writer=None, fps=None, dpi=None, codec=None,
771771
with writer.saving(self._fig, filename, dpi):
772772
for anim in all_anim:
773773
# Clear the initial frame
774-
anim._init_draw()
774+
if anim._init_func:
775+
anim._init_draw()
775776
for data in zip(*[a.new_saved_frame_seq()
776777
for a in all_anim]):
777778
for anim, d in zip(all_anim, data):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.