title: matplotlib, make smooth graph line
body: <p>I am having trouble making the line connecting the points on my graph smooth. It seems to be more difficult because i am running an animated graph, all the examples I've seen online are for static graphs. I tried following this interpolation example but I cant seem to get it working. Any matplotlib gurus out there? Here is the code for the graph.</p>
  
  <pre><code>import psutil
  import numpy as np
  import matplotlib.pyplot as plt
  import matplotlib as mpl
  import matplotlib.animation as animation
  from collections import deque
  
  
  fig = plt.figure()
  ax = plt.axes(xlim=(0, 200), ylim=(0, 100))
  line, = ax.plot([],[])
  
  y_list = deque([-1]*200)
  x_list = deque(np.arange(200,0,-1))
  
  
  def init():
      line.set_data([],[])
      return line,
  
  
  def animate(i):
      y_list.pop()
      y_list.appendleft(psutil.cpu_percent(None,False))
      line.set_data(x_list,y_list)
      return line,
  
  anim = animation.FuncAnimation(fig, animate, init_func=init,
                             frames=200, interval=100, blit=True)
  
  plt.show()
  </code></pre>