Skip to content

Commit b27863d

Browse files
committed
Merge pull request #5402 from jenshnielsen/fix5399
FIX: Only call init function at the begining of a save when user supplied
2 parents e6c6c00 + 728db55 commit b27863d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/animation.py

+2-1
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)