title: set_data and autoscale_view matplotlib
body: <p>I have multiple lines to be drawn on the same axes, and each of them are dynamically updated (I use set_data), The issue being that i am not aware of the x and y limits of each of the lines. And axes.autoscale_view(True,True,True) / axes.set_autoscale_on(True) are not doing what they are supposed to. How do i auto scale my axes?</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  fig = plt.figure()
  axes = fig.add_subplot(111)
  
  axes.set_autoscale_on(True)
  axes.autoscale_view(True,True,True)
  
  l1, = axes.plot([0,0.1,0.2],[1,1.1,1.2])
  l2, = axes.plot([0,0.1,0.2],[-0.1,0,0.1])
  
  #plt.show() #shows the auto scaled.
  
  l2.set_data([0,0.1,0.2],[-1,-0.9,-0.8])
  
  #axes.set_ylim([-2,2]) #this works, but i cannot afford to do this.  
  
  plt.draw()
  plt.show() #does not show auto scaled
  </code></pre>
  
  <p>I have referred to these already, <a href="http://www.mailinglistarchive.com/html/matplotlib-users@lists.sourceforge.net/2011-02/msg00116.html" rel="noreferrer">this</a> , <a href="https://stackoverflow.com/questions/3214576/matplotlib-autoscale">this</a>. 
  In all cases I have come across, the x,y limits are known. I have multiple lines on the axes and their ranges change, keeping track of the ymax for the entire data is not practical  </p>
  
  <p>A little bit of exploring got me to this, </p>
  
  <pre><code>xmin,xmax,ymin,ymax = matplotlib.figure.FigureImage.get_extent(FigureImage) 
  </code></pre>
  
  <p>But here again, i do not know how to access FigureImage from the Figure instance.</p>
  
  <p>Using matplotlib 0.99.3</p>