title: How to set a colormap in interactive plot animations in python
body: <p>The code below creates an animation of 600k points by scatter plotting 30k of them per frame. The animation works flawlessly, except for the fact that I don't know how to include my colormap (Heatintensity) in the animation. The Xs and Ys are changing but the color of the points is just blue. </p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  
  Heatintensity=workdata[0:600000] #Values controlling scatter colormap
  Xs=xCoord[0:600000]
  Ys=yCoord[0:600000]
  
  plt.ion()
  fig, ax = plt.subplots()
  sc = ax.scatter(Xs, Ys, c=Heatintensity, cmap=cm.jet, s=5)
  
  plt.draw()
  for i in range(20):
      sc.set_offsets(np.c_[Xs[(i*30000):(i*30000)+30000],\
                          Ys[(i*30000):(i*30000)+30000]])
      fig.canvas.draw_idle()
      plt.pause(0.1)
  </code></pre>