title: How to color 2.5 and 97.5 intervals using ggplot and geom_ribbon?
body: <p>I have the following code and need to color intervals. I think geom_ribbon could do it but I couldn't make it to work. Thanks.</p>
  <pre><code> # trying geo-ribbon
      library(data.table)
      library(tidyverse)
  #plot
  fly &lt;- fread(&quot;fly.summary&quot;, stringsAsFactors = F, data.table = F)
  colnames(fly) &lt;- c(&quot;mutation_per_site&quot;,     &quot;n_estimation&quot;,          &quot;theta_per_site_median&quot;, &quot;theta_per_site_2.5&quot;,   &quot;theta_per_site_97.5&quot;,&quot;year&quot;, &quot;Ne_median&quot; ,&quot;Ne_2.5&quot;,&quot;Ne_97.5&quot;, &quot;Ne_12.5&quot;,  &quot;Ne_87.5&quot; )
  
  min(fly$Ne_median)
  
  # log scaled
  ggplot() + geom_line(data = fly, aes(y = log10(Ne_median), x = log10(year), colour = &quot;fly&quot; )) + 
      geom_line(data = fly, aes(ymin = log10(Ne_2.5), x = log10(year), colour = &quot;fly_bound&quot; )) +
      geom_line(data = fly, aes(ymax = log10(Ne_97.5), x = log10(year), colour = &quot;fly_bound&quot; )) + 
      geom_ribbon(aes(ymin = &quot;Ne_2.5&quot;, ymax = &quot;Ne_97.5&quot; + 1), fill = &quot;fly&quot;) +
      geom_line(aes(y = log10(Ne_median)))
      theme_classic()
  </code></pre>
  <p>Current plot
  <img src="https://i.stack.imgur.com/rKUvc.jpg" alt="current plot" /></p>
  <p>What I aim for</p>
  <p><img src="https://i.stack.imgur.com/mlKXN.jpg" alt="What I aim for" /></p>
  <p><strong>Edit:</strong>
  As asked by Allan, here is the link for dput(fly) output for one species. It is over 80 mb so I uploaded in mega.nz</p>
  <p><a href="https://mega.nz/file/1mBAmI6Z#Zuc4SXqyQW1_yAkLZcCy0_8kx6lOdLW66Ga07whym5E" rel="nofollow noreferrer">Link to the dput(fly)</a></p>
  <p>Edit 2: updated the code.</p>
  <p>Edit 3: short dput nrow=200
  <a href="https://pastebin.com/raw/u5QmKVWh" rel="nofollow noreferrer">dput log</a></p>