Add files via upload

This commit is contained in:
David Rotermund 2023-09-27 15:45:55 +02:00 committed by GitHub
parent 3857a02ec8
commit 5403e7a0dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 11 deletions

View file

@ -22,6 +22,7 @@ class Anime:
colorbar: bool = True,
vmin_scale: float | None = None,
vmax_scale: float | None = None,
movie_file: str | None = None,
) -> None:
assert input.ndim == 3
@ -79,12 +80,14 @@ class Anime:
plt.title(f"{bar} {i} of {int(input_np.shape[0]-1)}", loc="left")
return
_ = matplotlib.animation.FuncAnimation(
ani = matplotlib.animation.FuncAnimation(
fig,
next_frame,
frames=int(input.shape[0]),
interval=interval,
repeat=repeat,
)
plt.show()
if movie_file is not None:
ani.save(movie_file)
else:
plt.show()