title: ggplot changing error bar locations when scale_y_continuous is changed
body: <p>I noticed an odd behavior in ggplot (unless there's some error I'm not seeing):</p>
  
  <pre><code>set.seed(111)
  d = data.frame(x = factor(sample(1:3, size=1000, replace=T)), y = rnorm(1000, 1, .5)^4)
  p = ggplot(data=d, aes(x=x, y=y)) +
      geom_jitter(alpha=.15, width=.05, size=.75) +
      stat_summary(fun.y='median', geom='point', size=2, color='red') +
      stat_summary(aes(x=x, y=y), geom='errorbar', fun.ymin=function(z) {quantile(z, .25)}, fun.ymax = function(z) {quantile(z, .75)}, fun.y=median, color='red', width=.2)
  p
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/WGRma.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WGRma.png" alt="enter image description here"></a></p>
  
  <p>I want to "zoom in" to see how the groups compare in terms of their IQRs, but then the upper quartiles change:</p>
  
  <pre><code>p + scale_y_continuous(limits=c(0, 5))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/LXk7N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LXk7N.png" alt="enter image description here"></a></p>
  
  <p>Notice the 75 percentile for each group is around 2, but when I compute the actual percentiles, I get values closer to 3:</p>
  
  <pre><code>&gt;aggregate(y~x, data=d, FUN=quantile, .75)
    x        y
  1 1 3.140711
  2 2 2.868939
  3 3 2.842267
  </code></pre>
  
  <p>Is this some quirk of ggplot? Or is there an error I'm missing?</p>