title: FuncAnimation() : remove/update old lines
body: <p>Here my code stripped down to its bare minimal to correctly reproduce my problem.</p>
  
  <pre><code>import matplotlib.animation as animation
  import os
  import matplotlib.pyplot as plt
  import numpy as np
  import os.path
  
  f, ((ax1, ax2)) = plt.subplots(1, 2, figsize=(20,10))
  
  def animate(i):
      chosenEnergy = (0.0 + (i-1)*(0.02))
      chosenEnergyLine = ax2.axvline(float(chosenEnergy),0,1, linestyle='dashed')
      return chosenEnergyLine,
  
  def init():
      chosenEnergyLine = ax2.axvline(0.0,0,1, linestyle='dashed')
      return chosenEnergyLine,
  
  ani = animation.FuncAnimation(f, animate, np.arange(1,nE), init_func=init,
  interval=25, blit=False, repeat = False)
  
  plt.rcParams['animation.ffmpeg_path'] = '/opt/local/bin/ffmpeg'
  FFwriter = animation.FFMpegWriter()
  
  ani.save('basic_animation.mp4', writer = FFwriter, fps=30, extra_args=['-vcodec', 'libx264'])
  print "finished"
  </code></pre>
  
  <p>The problem is that I want to new vertical line (at a different energy) to replace the old line. Instead, the final frame shows all lines.</p>
  
  <p>I found a similar question (<a href="https://stackoverflow.com/questions/32013763/matplotlib-circle-animation-how-to-remove-old-circle-in-animation">matplotlib circle, animation, how to remove old circle in animation</a>), but does not seem to apply for my case.</p>
  
  <p>Even if a similar function as the one used in the answer to this similar question (<code>set_radius</code>) exists for <code>xvline</code>, I'd prefer not to use it. In my other subplot (ax1), I have a scatter plot that will have to be updated each time. Is there a general way to clear the plot before the next time step? </p>
  
  <p>I also didn't notice any change when using blit=False or blit=True.</p>
  
  <p>Any suggestion on how to proceed?</p>