fig = plt.figure() ims = [] for i in range(data.shape[2]): im = plt.imshow(data[:, :, i, 1].T, cmap='gray', animated=True) plt.gca().invert_yaxis() ims.append([im]) ani = animation.ArtistAnimation(fig, ims, interval=100) ani.save('Axial.gif' ,writer = 'imagemagick’) 脳の下から上に移動しているGif