title: How to do color overlay between errorbar and bar in a bar chart?
body: <p>I have a bar chart with errorbars, and I want to use the same color for both bar and errorbar. However, this would mean that I could not see the bottom part of the errorbar.</p>
  <pre class="lang-r prettyprint-override"><code>library(ggplot2)
  library(tibble)
  
  my_df &lt;- 
    tibble::tribble(~response, ~estimate, ~lower_ci, ~upper_ci,
                    &quot;little_bit&quot;, 0.353477, 0.255625, 0.451747,
                    &quot;no&quot;, 0.307639, 0.250436, 0.375393,
                    &quot;very&quot;, 0.338883, 0.301007, 0.37572310)
  
  ## compare this:
  ggplot(my_df, aes(x = reorder(response, -estimate), y = estimate)) +
    geom_bar(stat = &quot;identity&quot;, width = 0.9, fill = &quot;#6EB3FF&quot;) +
    geom_errorbar(aes(ymin = lower_ci, ymax = upper_ci),
                  width = 0.1, size = 3.5)
  
  ## with this:
  ggplot(my_df, aes(x = reorder(response, -estimate), y = estimate)) +
    geom_bar(stat = &quot;identity&quot;, width = 0.9, fill = &quot;#6EB3FF&quot;) +
    geom_errorbar(aes(ymin = lower_ci, ymax = upper_ci),
                  width = 0.1, size = 3.5, color = &quot;#6EB3FF&quot;)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/3Xnny.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3Xnny.png" alt="from_to" /></a></p>
  <hr />
  <h2> My visual idea is to use overlay </h2>
  <br>
  <p><a href="https://i.stack.imgur.com/uorEH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uorEH.png" alt="overlay" /></a></p>
  <br>
  <p><a href="https://i.stack.imgur.com/SD1Ra.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SD1Ra.gif" alt="gif" /></a></p>
  <p>Is there a way to achieve such overlay using <code>ggplot</code>?</p>