title: How to plot confidence interval bars in histogram, with python?
body: <p>I computed the confidence interval of some data shown in the histogram. 
  Now, I want to add the confidence bars in the plot, but I don't know how to do this. Does anyone have advice for me on how to proceed? </p>
  
  <pre><code>import matplotlib.pyplot as plt
  from functools import reduce
  plt.style.use('ggplot')
  from scipy.stats import sem, t
  from scipy import mean
  import seaborn as sns
  
  List_slopes= [[0.0437712648015943], [0.03891732777088522], [0.04873966717541519], [0.06834041111023302], [0.03290835239919912], [0.05676673320560569], [0.04193367376660084], [0.05453567515132543],
           [0.0436988106026637], [0.05639531551298649], [0.033151533411499554], [0.05312718258689977], [0.03201472087883465], [0.06138900127756917], [0.04084566472094725], [0.030980452931883645],
           [0.03490031676420862], [0.05617484928592166], [0.05756062483863055], [0.05062138233057321], [0.037458909465997274], [0.0452444541408649], [0.031985252895496544], [0.05202456296370903],
           [0.054154933324027967], [0.052119386421266026], [0.03637328841280627], [0.052831824786532394], [0.05250896675489661], [0.030371934074959257], [0.05559661606514884], [0.0524023454048075]
           , [0.05716250142416688], [0.04272492198584081], [0.05737607811682808], [0.03440778732820213], [0.04386663383861987], [0.0526401870652505], [0.05718775471785554], [0.05862797457176922],
           [0.025116204881676027], [0.05158014618741805], [0.03764036354269462], [0.037389249896867205], [0.062041377418890396], [0.04436736176610321]]
  
  confidence = 0.95
  
  n = len(List_slopes)
  average = mean(List_slopes)  # average, mean
  print(average)
  std_err = sem(List_slopes)  # standard deviation
  print(std_err)
  confidence_interval = std_err * t.ppf((1 + confidence) / 2, n - 1)  # t.pp is equivalent to Excel TINV(2*0.05,999)
  print(confidence_interval)
  
  Lower_CI = average - confidence_interval
  Upper_CI = average + confidence_interval
  
  sns.distplot(List_slopes, kde=True)
  plt.xlabel("Slopes ")
  plt.ylabel("Frequency of Slopes")
  plt.text(.5, .75, str(round(confidence * 100)) + '% Confidence Interval', fontsize=25, color='black', ha='center')
  plt.text(.5, .35, str(round(Lower_CI[0], 2)) + ' to ' + str(round(Upper_CI[0], 2)), fontsize=25, color='black', ha='center')
  plt.show()
  </code></pre>
  
  <p>In this figure I put the figure resulted from my code. I want to plot the line 0.04 and 0.05, because they represent an exampel of error bars. I mean that I want to plot Lower_CI and Upper_CI. </p>
  
  <p><a href="https://i.stack.imgur.com/Y2I0z.png" rel="nofollow noreferrer">enter image description here</a></p>