Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix Animation.save #14048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 26, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/matplotlib/animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,10 @@ def func(current_frame: int, total_frames: int) -> Any
# Clear the initial frame
anim._init_draw()
frame_number = 0
save_count_list = [a.save_count for a in all_anim]
# TODO: Currently only FuncAnimation has a save_count
# attribute. Can we generalize this to all Animations?
save_count_list = [getattr(a, 'save_count', None)
for a in all_anim]
if None in save_count_list:
total_frames = None
else:
Expand Down