Skip to content

Commit 978c0d5

Browse files
author
Nicholas Holschuh
committed
Merge branch 'main' of github.com:nholschuh/NDH_PythonTools
This commit pulls in missing files
2 parents a1e1b42 + f74dcea commit 978c0d5

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

flatten_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ def flatten_list(list_of_lists,recursive=1):
5757
flat_list = []
5858

5959

60-
return flat_list
60+
return flat_list

generate_animation.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@ def generate_animation(fps,title='Matplotlib Animation',comment='Matplotlib Anim
3232

3333

3434
# Define the meta data for the movie
35-
FFMpegWriter = manimation.writers['ffmpeg']
36-
metadata = dict(title=title, artist='Matplotlib',
35+
try:
36+
FFMpegWriter = manimation.writers['ffmpeg']
37+
metadata = dict(title=title, artist='Matplotlib',
3738
comment=comment)
38-
writer = FFMpegWriter(fps=fps, metadata=metadata)
39-
return writer
39+
writer = FFMpegWriter(fps=fps, metadata=metadata)
40+
except:
41+
PillowWriter = manimation.writers['pillow']
42+
metadata = dict(title=title, artist='Matplotlib',
43+
comment=comment)
44+
writer = PillowWriter(fps=fps, metadata=metadata)
45+
46+
return writer

0 commit comments

Comments
 (0)