title: How to stack two ggplot points on top of each other with error bars
body: <p>I am attempting to plot two points that have error bars on them on top of each other in ggplot. However, the error bars are not syncing up with the points. This is the code that I'm using, and I have my ensuing graph attached: </p>
  
  <pre><code>df = data.frame(rtix = mean(DandI_Variance$`1RTI`[1:11]),
                  rtiy = 50,
                  rtixmin = DandI_Variance$`1RTI`[11],
                  rtixmax = DandI_Variance$`1RTI`[1],
                  rtiymin = 52,
                  rtiymax = 42,
                  rtcx = mean(DandI_Variance$`1RTC`[1:11]),
                  rtcy = 75,
                  rtcxmin = DandI_Variance$`1RTC`[11],
                  rtcxmax = DandI_Variance$`1RTC`[1],
                  rtcymin = 69,
                  rtcymax = 79)
  
  ggplot(data = df, aes(x = rtix, y = rtiy)) + 
    geom_point() + 
    geom_errorbar(aes(ymin = rtiymin, ymax = rtiymax, width = .07, color = "blue")) + 
    geom_errorbarh(aes(xmin = rtixmin, xmax = rtixmax, height = 10, color = "blue")) + 
  
    geom_point(aes(x = rtcx, y = rtcy)) + 
    geom_errorbar(aes(ymin = rtcymin, ymax = rtcymax, width = .07, color = "red")) + 
    geom_errorbarh(aes(xmin = rtcxmin, xmax = rtcxmax, height = 10, color = "red")) +
  
    xlab("S Equalibrium") +
    ylab("Time to Equalibrium") +
    ylim(0, 100) + 
    xlim(0, 1) +
    ggtitle("Performance of Models") 
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/9M6ed.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9M6ed.png" alt="plot"></a></p>