return imobj,

def animate(i):
    fname = 'heatflow%03d.png' % i
img = mgimg.imread(fname)[-1::-1]
imobj.set_data(img)
return imobj,
imobj = ax.imshow(np.zeros((100, 100)), origin='lower', alpha=1.0, zorder=1,
    aspect=1)
anim = animation.FuncAnimation(fig, animate, init_func=init, repeat=True,
    frames=list(range(1, 4)), interval=200, blit=True, repeat_delay=1000)
plt.show()
Animating pngs in matplotlib using ArtistAnimation