title: Autoscaling y axis to visible data in pyqtgraph
body: <p>I have a time series waveform plot made with pyqtgraph. The user should be able to zoom in and out to various points in time (x-axis), and the y-axis should automatically scale to whatever data is visible within the current range of x values. I believe that <code>enableAutoRange</code> and <code>setAutoVisible</code> should allow this, but it doesn't seem to work. I have unlocked the aspect ratio but this doesn't seem to help.</p>
  
  <p>A minimal example is below, please could anyone suggest how to get this working? Ideally when you zoom in to the low-amplitude data on the right hand side, the y-axis should scale up so that the sine wave is visble.</p>
  
  <pre><code>import numpy                   
  import pyqtgraph               
  
  x_data = numpy.linspace(0, 100, num=10000)
  y_data = 1000*numpy.sin(x_data)           
  y_data[5000:] = numpy.sin(x_data[5000:])  
  
  plt = pyqtgraph.plot(x_data, y_data)      
  plt.setMouseEnabled(x=True,y=False)       
  
  vb = plt.getViewBox()                     
  vb.setAspectLocked(lock=False)            
  vb.setAutoVisible(y=1.0)                
  vb.enableAutoRange(axis='y', enable=True)
  </code></pre>
  
  <p>One interesting thing is that if you zoom to the right hand side, and then right click and select Y-Axis>Auto, it works as expected.</p>