title: Fix y-axis bottom limit to 0 using matplotlib.animation.FuncAnimation while imposing no top limit on two subplots
body: <p>I am acquiring data from an external device and I am plotting it in real-time using matplotlib.animation.FuncAnimation. For this measurement, it is important to keep the bottom y-axis limit at 0, but keeping the upper limit free. The device itself returns two sets of data for this measurement so I am animating both sets at the same time, hence the subplots.</p>
  
  <p>Searching online suggests using <code>axes.set_ylim(bottom=0)</code>, both in <a href="https://stackoverflow.com/questions/11744990/how-to-set-auto-for-upper-limit-but-keep-a-fixed-lower-limit-with-matplotlib">this question</a> and <a href="https://stackoverflow.com/questions/53423868/matplotlib-animation-how-to-dynamically-extend-x-limits">this one</a>. However their solutions do not work for me. </p>
  
  <p>The autoscalling that's already part of the code is using <code>axes.relim()</code> and <code>axes.autoscale_view(True, True, True)</code>, from the answer to another question which I have since forgotten. Messing with these lines of code seems to fix the viewing window but it no longer scales with the data. The data could then animate itself 'off-screen'.</p>
  
  <p>I've recreated below the essence of what the acquisition (ideally) looks like since it's easier then using multiple files. 
  I am assuming that the problem lies in <code>animate_corr(i)</code> with the scaling. The rest is of the code is simply getting and plotting the data.</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import matplotlib.animation as animation
  
  #used to generate test data
  import random
  pi = np.pi 
  factor = 1
  random.seed(123)
  
  #procedural data generation for left plot
  def get_data(data):
      global mu
      global b
      global index
      global factor
      b=b*0.99
      factor=factor*1.01
      new_data = [factor*(((1-((1/(2*b))*np.exp(-1*(abs(i-mu))/b)))*random.random())+10) for i in index]
  
      return new_data
  
  #procedural data generation for right plot
  def get_data_norm(data):
      global mu
      global b
      global index
  
      new_data = [((1-((1/(2*b))*np.exp(-1*(abs(i-mu))/b)))+10) for i in index]
      return new_data
  
  #animation function, assuming problem is here
  def animate_corr(i):
      global dat
      global dat_norm
  
      dat = get_data(dat)
      dat_norm = get_data_norm(dat_norm)
  
      #these two not working as expected
      axs_corr[0].set_ylim((0, None), auto=True)
      axs_corr[1].set_ylim(bottom=0, top=None, auto=True)
  
      line_corr.set_ydata(dat)
      line_corr_norm.set_ydata(dat_norm)
  
      #rescales axes automatically
      axs_corr[0].relim()
      axs_corr[0].autoscale_view(True,True,True)
  
      axs_corr[1].relim()
      axs_corr[1].autoscale_view(True,True,True)
  
      return line_corr, line_corr_norm,
  
  #plots definitions
  fig_corr, axs_corr = plt.subplots(1,2, sharex=True, figsize=(10,5))
  fig_corr.suptitle('Animated Correlation')
  
  #x is fixed
  length = 1001
  index = np.linspace(-10,10,length)
  
  #laplacian distribution parameters
  mu = 0
  b = 2
  
  #data
  dat = [(1-((1/(2*b))*np.exp(-1*(abs(i-mu))/b)))+10 for i in index]
  dat_norm = [(1-(1/(2*b))*np.exp(-(abs(i-mu))/b))+10 for i in index]
  
  #initial plots
  line_corr, = axs_corr[0].plot(index, dat)
  line_corr_norm, = axs_corr[1].plot(index, dat_norm)
  
  #titles
  axs_corr[0].set_title('Random')
  axs_corr[1].set_title('No Random')
  
  #axes labels
  fig_corr.text(0.51, 0.04, 'Time (ns)', ha='center')
  fig_corr.text(0.04, 0.5, 'Coincidinces', va='center', rotation='vertical')
  
  #animation call              
  ani_corr = animation.FuncAnimation(fig_corr, animate_corr, interval=10, blit=False, save_count=50)
  plt.show()
  </code></pre>
  
  <p>I would like to have both plots have the y-axis limit fixed at 0. So the left one would keep increasing its max value and seeing this reflected in its scale. The right plot would have its dip get sharper and sharper but once its smaller than 0, the plot wouldn't change its scale anymore (since this plot doesn't have its values get larger).</p>