Skip to content

Commit 6ec0b76

Browse files
authored
fix gif_file param handling in show_anim (#42)
1 parent 448b5a7 commit 6ec0b76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

open_atmos_jupyter_utils/show_anim.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def show_anim(plot_func, frame_range, duration=0.01, loop=0, gif_file=None):
1515
"""plot_func is called with one argument - the frame number from frame_range
1616
and is expected to return a matplotlib figure instance (on which savefig()
1717
and close() are subsequently called)"""
18-
gif_file = gif_file or TemporaryFile(suffix=".gif")
18+
gif_file = TemporaryFile(suffix=".gif", filename=gif_file)
1919
with tempfile.TemporaryDirectory() as tmpdirname:
2020
for frame in frame_range:
2121
fig = plot_func(frame)

0 commit comments

Comments
 (0)