title: how to animate matplotlib function optimization?
body: <p>I am trying to make something similar to Matlab function optimization animation. There is a package in Matlab which allows animation of optimization functions. </p>
  
  <p>I don't want to call <code>anim.FuncAnimation</code> because my optimization function will be called automatically via <code>scipy.minimize</code></p>
  
  <p>In the argument to <code>scipy.minimize</code> the optimization function should do the animation for instance...</p>
  
  <pre><code>lines.set_data(x,y)
  </code></pre>
  
  <p>Here x and y will be from the optimization function. Obviously this doesn't work.</p>