We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
gif_file
show_anim
1 parent 448b5a7 commit 6ec0b76Copy full SHA for 6ec0b76
open_atmos_jupyter_utils/show_anim.py
@@ -15,7 +15,7 @@ def show_anim(plot_func, frame_range, duration=0.01, loop=0, gif_file=None):
15
"""plot_func is called with one argument - the frame number from frame_range
16
and is expected to return a matplotlib figure instance (on which savefig()
17
and close() are subsequently called)"""
18
- gif_file = gif_file or TemporaryFile(suffix=".gif")
+ gif_file = TemporaryFile(suffix=".gif", filename=gif_file)
19
with tempfile.TemporaryDirectory() as tmpdirname:
20
for frame in frame_range:
21
fig = plot_func(frame)
0 commit comments