title: ggplot bar chart with two dataframes
body: <p>What I am trying to do is create a "dodged" bar chart using gglot from two different dataframes</p>
  
  <p>Unfortunately <code>geom_bar</code> doesn't see the previous data added so it plots it right over top, I've tried playing with position and width but it doesn't seem to change anything probably due to the fact that it is one bar per category.</p>
  
  <p>The code below creates the data plots the data incorrectly (bars are on top of one another) and then plots it correctly using a workaround of binding the dataframes together.</p>
  
  <pre><code>library("ggplot2")
  
  x&lt;-data.frame(dat=rep(seq(1,4),3),let=rep("X"))
  y&lt;-data.frame(dat=rep(seq(1,4),4),let=rep("y"))
  
  xy&lt;-rbind(x,y)
  
  #what I would like to use with two different data frames
  ggplot(NULL,aes(dat))+
    geom_bar(data=y,fill="red",width=0.1,position = "dodge")+
    geom_bar(data=x,fill="blue",width=0.1,position = "dodge")
  
  #what I would like to see only without binding dfs
  ggplot(xy,aes(dat,fill=let))+geom_bar(position="dodge")
  </code></pre>
  
  <p>I'm using ggplot to be constant with other plots that use only a single dataframe.</p>