title: Animation with pcolormesh routine in matplotlib, how do I initialize the data?
body: <p>I am trying to animate a <code>pcolormesh</code> in <code>matplotlib</code>. I have seen many of the examples using the package animation, most of them using a 1D plot routine, and some of them with <code>imshow()</code>.
  First, I wan to use the <code>FuncAnimation routine</code>. My problem is, first, that I do not know if I can initialize the plot</p>
  
  <pre><code>fig,ax = plt.subplots()
  quad = ax.pcolormesh(X,Y,Z)
  </code></pre>
  
  <p>I have tried a few simple lines:</p>
  
  <pre><code>fig,ax = plt.subplots()
  quad = ax.pcolormesh([])
  
  def init():
      quad.set_array([])
      return quad,
  
  def animate(ktime):  
      quad.set_array(X,Y,np.sin(Z)+ktime)
  return quad,
  
  anim = animation.FuncAnimation(fig,animate,init_func=init,frames=Ntime,interval=200,blit=True)
  
  plt.show()
  </code></pre>
  
  <p>By the way, How do I set labels into and animated plot? Can I animate the title, if it is showing a number that changes in time?
  Thanks</p>