title: How to I fill the central 95% confidence interval of a matplotlib histogram?
body: <p>I am able to make a matplotlib histogram no problem. However, I'm wondering if it's possible to use something like <code>fillbetween</code> to change the fill color of the central 95% CI of my data. </p>
  
  <p>I can only get <code>fillbetween</code> to work when if I use a trick with a numpy histogram and bincenters. i.e.: </p>
  
  <pre><code>bins = np.linspace(-a.max(),a.max(),400)
  hist = np.histogram(a,bins = bins)[0]
  bincenters = 0.5*(bins[1:] + bins[:-1])
  
  b = plt.plot(bincenters,hist, linestyle = 'None')
  plt.fill_between(bincenters,hist, color = '#7f7f7f')
  
  plt.fill_between(bincenters, hist, interpolate=False,
                  where=((bincenters&gt;=lower_p) &amp; (bincenters&lt;=upper_p)), hatch = '...', facecolor = '#7f7f7f')```
  
  
  Here's my existing code that I'd rather use to create the matplotlib histogram (which I think looks better) with some extras plotting on top: 
  
  #Create Histogram
  axes[1] = boota.plot.hist(ax = axes[1],bins = 50, legend = None, histtype = 'bar', color = '#7f7f7f')
  axes[1].set_xlabel('Spatial Decay Rate (α)', size = 16, fontweight = 'bold')
  axes[1].set_ylabel('Frequency', labelpad = 11, size = 16, fontweight = 'bold')
  
  #Ticklabels 
  axes[0].tick_params(labelsize = 14)
  axes[1].tick_params(labelsize = 14)
  
  #draw vertical line at remote powerlaw (rem_a)
  rem_a = 0.649
  axes[1].axvline(x=rem_a, color='k', linestyle='dashed', linewidth=1.5, label='remote decay \nrate $α_r$ = 0.649')
  legend = axes[1].legend(ncol = 1, loc = 'upper left', fontsize='large')
  legend.draw_frame(False)
  
  at2 = AnchoredText("B",prop=dict(size=20), loc='upper right',frameon=False)
  axes[1].add_artist(at2)
  </code></pre>