10000 Backport PR #14048: Fix Animation.save · matplotlib/matplotlib@8ddf88e · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ddf88e

Browse files
tacaswellMeeseeksDev[bot]
authored andcommitted
Backport PR #14048: Fix Animation.save
1 parent 122a261 commit 8ddf88e

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
@@ -1138,7 +1138,10 @@ def func(current_frame: int, total_frames: int) -> Any
11381138
# Clear the initial frame
11391139
anim._init_draw()
11401140
frame_number = 0
1141-
save_count_list = [a.save_count for a in all_anim]
1141+
# TODO: Currently only FuncAnimation has a save_count
1142+
# attribute. Can we generalize this to all Animations?
1143+
save_count_list = [getattr(a, 'save_count', None)
1144+
for a in all_anim]
11421145
if None in save_count_list:
11431146
total_frames = None
11441147
else:

0 commit comments

Comments
 (0)
0