title: Can a seaborn (distplot) yaxis be automatically rescaled?
body: <p>Can a <a href="https://seaborn.pydata.org/generated/seaborn.distplot.html" rel="nofollow noreferrer">Seaborn distplot</a> be set to automatically re-scale the yaxis to capture the maximum y extent of multiple plotted datasets?</p>
  
  <p>When doing batches of plots using <a href="https://seaborn.pydata.org/" rel="nofollow noreferrer">Seaborn</a>, sometimes it is unavoidable  that data is provided without an increasing maximum frequency value. When this happens the created plot yaxis cuts off data. However, <a href="https://seaborn.pydata.org/generated/seaborn.distplot.html" rel="nofollow noreferrer"><code>sns.distplot()</code></a> is fine if data is provided with increasing maximum. </p>
  
  <p>This can be fixed via <a href="https://matplotlib.org/api/_as_gen/matplotlib.patches.Patch.html" rel="nofollow noreferrer"><code>Matplotlib.patches</code></a> or just by calling <a href="https://matplotlib.org/api/_as_gen/matplotlib.axes.Axes.autoscale.html" rel="nofollow noreferrer"><code>ax.autoscale()</code></a>(Thanks <a href="https://stackoverflow.com/users/4124317/importanceofbeingernest">@ImportanceOfBeingErnest</a> for the later suggestion), but either seems "kludgey"... </p>
  
  <p>Simple worked example:</p>
  
  <pre><code># Import modules
  import numpy as np
  from scipy.stats import truncnorm
  import matplotlib.pyplot as plt
  import seaborn as sns; sns.set(color_codes=True)
  
  # Make some random data (credit: [@bakkal's Answer][3])
  scale = 3.
  range = 10
  size = 100000
  X = truncnorm(a=-range/scale, b=+range/scale, scale=scale).rvs(size=size)
  
  # --- first time to show issue
  # Now plot up 1st set of data (with first dataset having high Y values)
  ax= sns.distplot( X*4 )
  # Now plot up two more
  for i in np.arange(1, 3):
      sns.distplot( X*i, ax=ax )
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/x153L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x153L.png" alt=" (Issue!)"></a></p>
  
  <pre><code># --- Second time with a "kludgey" fix
  ax = sns.distplot( X*4 )
  # Now plot up two more
  for i in np.arange(1, 3):
      sns.distplot( X*i, ax=ax )
  # Now force y axis extent to be correct
  ax.autoscale()
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/EUIxe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EUIxe.png" alt="(Success!)"></a></p>
  
  <pre><code># --- Third time with increasing max in data provided 
  ax= sns.distplot( X )
  # Now plot up two more
  for i in np.arange(2, 4 ):
      sns.distplot( X*i, ax=ax )
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/doq3C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/doq3C.png" alt="(success too)"></a></p>