title: ggplot2 adding layers, one bar plot on top of another results in unexpected bar behavoiur
body: <p>I'm trying to put one plot above another (i.e., plot 1 and 2 below); but get some, for me, unexpected behaviour in the third plot (see picture). I would like the second plot to appear on top of the first plot. R code and example data are provided below. Any help is much appreciated. </p>
  
  <pre><code> #Example data for plot 1 
   GroupM &lt;- c("one", "one","one", "one", "two", "two", "two", "two", "three", "three","three", "three", "four", "four",  "four", "four")
   Outcome_MeasureM &lt;- c("Money", "Money", "Money", "Money", "Money", "Money", "Money", "Money", "Money", "Money", "Money", "Money", "Money", "Money", "Money", "Money")
   FrequencyM &lt;- c(-0.49, -0.51, -0.49, -0.51, -1.4, -1.3,-1.4, -1.3, 1.3, 1.35, 1.3, 1.35, 0.5, 0.56, 0.5, 0.56)
   pilot1dataM &lt;- data.frame(GroupM, Outcome_MeasureM, FrequencyM)
  
   #Plot 1
   plot1 &lt;- ggplot(data=pilot1dataM, stat="identity", aes(GroupM, FrequencyM, fill = Outcome_MeasureM)) + stat_summary(fun.y = mean, geom = "bar", position = "dodge", alpha=0.4) + 
     stat_summary(fun.data = mean_cl_boot, geom = "errorbar", position=position_dodge(width=0.90), width = 0.2) + 
     labs(x = "Group \n(n)", y = "Z-Transformed Money and Experience", fill = "") + 
     scale_fill_manual(values = "#27ae60") +
     scale_y_continuous(breaks = seq(-1, 1, by = 0.1), labels= c("-1", "-.9" ,"-.8", "-.7", "-.6", "-.5", "-.4", "-.3", "-.2", "-.1","0", ".1", ".2", ".3", ".4", ".5", ".6", ".7", ".8", ".9", "1"))+ coord_cartesian(ylim=c(-1.4,1.4)) +
     theme(legend.text=element_text(size=10, face="plain"), legend.title=element_text(size=2), legend.key.size=unit(4, "mm"), legend.position="bottom") 
   plot1
  
   #Example data for plot 2
   GroupE &lt;- c("one", "one", "one", "one", "two", "two", "two", "two", "three", "three", "three", "three", "four", "four", "four", "four")
   Outcome_MeasureE &lt;- c("Exp1", "Exp1", "Exp2", "Exp2", "Exp1", "Exp1", "Exp2", "Exp2","Exp1", "Exp1", "Exp2", "Exp2", "Exp1", "Exp1", "Exp2", "Exp2")
   FrequencyE &lt;- c(0.1, 0.12, 0.02, 0.05, -0.4, -0.35, -0.7, -0.67, 0.02, 0.04, 0.35, 0.37, 0.7, 0.72, 0.8, 0.85)
   pilot1dataE &lt;- data.frame(GroupE, Outcome_MeasureE, FrequencyE)
  
  
   # Plot 2
   plot2 &lt;- ggplot(pilot1dataE, aes(GroupE, FrequencyE, fill =      Outcome_MeasureE)) + stat_summary(fun.y = mean, geom = "bar", position = "dodge") + 
     stat_summary(fun.data = mean_cl_boot, geom = "errorbar", position=position_dodge(width=0.90), width = 0.2) + 
     labs(x = "Group \n(n)", y = "Z-Transformed Money and Experience", fill = "") + 
     scale_fill_manual(values = c("#27ae60","#3498db","#666699")) +
     scale_y_continuous(breaks = seq(-1, 1, by = 0.1), labels= c("-1", "-.9" ,"-.8", "-.7", "-.6", "-.5", "-.4", "-.3", "-.2", "-.1","0", ".1", ".2", ".3", ".4", ".5", ".6", ".7", ".8", ".9", "1"))+      coord_cartesian(ylim=c(-1.4,1.4)) +
     theme(legend.text=element_text(size=10, face="plain"), legend.title=element_text(size=2), legend.key.size=unit(4, "mm"), legend.position="bottom") 
   plot2 
  
   #Trying to add the two plots on top of each other
   TwoPlots &lt;- plot1 + geom_bar(data=pilot1dataE, stat="identity")
   TwoPlots
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/MHmiF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MHmiF.png" alt="enter image description here"></a></p>