title: displot for a specific histogram (not normal)
body: <p>I am trying to overlay a truncated normal distribution with specific a and b parameters over a histogram of samples generated from the very same distribution.</p>
  
  <p>How do I fit with a pdf of truncnorm(a,b)?<a href="https://i.stack.imgur.com/X3Fwl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X3Fwl.png" alt="This is what it looks like right now"></a></p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import scipy.stats as stats
  import matplotlib.mlab as mlab
  
  from IPython.display import Math, Latex
  # for displaying images
  from IPython.core.display import Image
  # import seaborn
  import seaborn as sns
  # settings for seaborn plotting style
  sns.set()
  # settings for seaborn plot sizes
  sns.set(rc={'figure.figsize':(5,5)})
  
  tempdist=[]
  
  samples=100
  
  for k in range(1,samples):
      #Probability
      #Storage temp as truncated normal
      #temperature as normal mean 55 with 5F variation
      storagetempfarenht = 57 #55
      storagetempkelvin = (storagetempfarenht + 459.67) * (5.0/9.0)
      highesttemp=storagetempfarenht + 5
      lowesttemp= storagetempfarenht -5
      sigma = ((highesttemp + 459.67) * (5.0/9.0)) - storagetempkelvin
      mu, sigma = storagetempkelvin, sigma
      lower, upper = mu-2*sigma , mu+2*sigma
      a=(lower - mu) / sigma
      b=(upper - mu) / sigma
      temp =stats.truncnorm.rvs(a, b, loc=mu, scale=sigma, size=1)
      mean, var, skew, kurt = stats.truncnorm.stats(a, b, moments='mvsk')
  
      tempdist.append(temp)
  
  #Theses are the randomly generated values
  tempdist=np.array(tempdist)
  
  x = range(250,350)
  
  ax = sns.distplot(tempdist,
                    bins=500,
                    kde=True,
                    color='r',
                    fit=stats.truncnorm,
                    hist_kws={"linewidth": 15,'alpha':1})
  ax.set(xlabel='Trunc Normal Distribution', ylabel='Frequency')
  </code></pre>