Using matplotlib.animate to animate a contour plot in python
问题 I have a 3D array of data (2 spatial dimensions and 1 time dimension) and I'm trying to produce an animated contour plot using matplotlib.animate. I'm using this link as a basis: http://jakevdp.github.io/blog/2012/08/18/matplotlib-animation-tutorial/ And here's my attempt: import numpy as np from matplotlib import pyplot as plt from matplotlib import animation from numpy import array, zeros, linspace, meshgrid from boutdata import collect # First collect data from files n = collect("n") #