8000 Merge pull request #14048 from timhoffm/fix-animation-save · matplotlib/matplotlib@63ef1a1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 63ef1a1

Browse files
authored
Merge pull request #14048 from timhoffm/fix-animation-save
FIX: Animation.save
2 parents 7234ae3 + decb243 commit 63ef1a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/animation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1134,7 +1134,10 @@ def func(current_frame: int, total_frames: int) -> Any
11341134
# Clear the initial frame
11351135
anim._init_draw()
11361136
frame_number = 0
1137-
save_count_list = [a.save_count for a in all_anim]
1137+
# TODO: Currently only FuncAnimation has a save_count
1138+
# attribute. Can we generalize this to all Animations?
1139+
save_count_list = [getattr(a, 'save_count', None)
1140+
for a in all_anim]
11381141
if None in save_count_list:
11391142
total_frames = None
11401143
else:

0 commit comments

Comments
 (0)
0