animation
%matplotlib notebook
import matplotlib.pyplot as plt
from matplotlib import animation
def update(i):
plt.clf()
n = 2500+i
plt.imshow(atest
:, :, n
)
plt.title(str(n))
hoge = animation.FuncAnimation(fig, update, np.arange(1, N), interval=1000)
plt.show()
https://twitter.com/ohdachi/status/1496299175147094019?s=20&t=_aEInoL_gUEjVeb9WcDkUg