title: ggplot2: Shift the baseline of barplot (geom_bar) to the minimum data value
body: <p>I'm trying to generate a bar plot using <code>geom_bar</code>. My bars have both negative and positive values:</p>
  
  <pre><code>set.seed(1)
  df &lt;- data.frame(y=log(c(runif(6,0,1),runif(6,1,10))),se=runif(12,0.05,0.1),name=factor(rep(c("a","a","b","b","c","c"),2),levels=c("a","b","c")),side=factor(rep(1:2,6),levels=1:2),group=factor(c(rep("x",6),rep("y",6)),levels=c("x","y")),stringsAsFactors=F)
  </code></pre>
  
  <p>This plot command plots the positive bars to face up and the negative ones to face down:</p>
  
  <pre><code>library(ggplot2)
  dodge &lt;- position_dodge(width=0.9)
  limits &lt;- aes(ymax=y+se,ymin=y-se)
  ggplot(df,aes(x=name,y=y,group=interaction(side,name),col=group,fill=group))+facet_wrap(~group)+geom_bar(width=0.6,position=position_dodge(width=1),stat="identity")+
  geom_bar(position=dodge,stat="identity")+geom_errorbar(limits,position=dodge,width=0.25)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/vUarV.png" rel="nofollow"><img src="https://i.stack.imgur.com/vUarV.png" alt="enter image description here"></a></p>
  
  <p>My question is how do I set the base line to the minimum of all bars instead of at 0 and therefre have the red bars facing up?</p>