title: Shading a kernel density plot between two points.
body: <p>I frequently use kernel density plots to illustrate distributions. These are easy and fast to create in R like so:</p>
  
  <pre><code>set.seed(1)
  draws &lt;- rnorm(100)^2
  dens &lt;- density(draws)
  plot(dens)
  #or in one line like this: plot(density(rnorm(100)^2))
  </code></pre>
  
  <p>Which gives me this nice little PDF:</p>
  
  <p><a href="https://i.stack.imgur.com/lAOVK.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lAOVK.png" alt="enter image description here"></a></p>
  
  <p>I'd like to shade the area under the PDF from the 75th to 95th percentiles. It's easy to calculate the points using the <code>quantile</code> function:</p>
  
  <pre><code>q75 &lt;- quantile(draws, .75)
  q95 &lt;- quantile(draws, .95)
  </code></pre>
  
  <p>But how do I shade the the area between <code>q75</code> and <code>q95</code>?</p>