title: How to reduce binwidth in geom_bar for one single bar?
body: <p>I'm trying to get a side-by-side bar plot using ggplot's <code>geom_bar()</code>. Here's some sample data I made up for replication purposes:</p>
  
  <pre><code>dat &lt;- data.frame("x"=c(rep(c(1,2,3,4,5),5)),
                    "by"=c(NA,0,0,0,0,NA,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1))
  </code></pre>
  
  <p>I want to plot "x" grouped by "by". Now, because I don't need to plot <code>NA</code> values, I filtered for <code>!is.na(by)</code>)</p>
  
  <pre><code>library(dplyr)
  dat &lt;- filter(dat, !is.na(by))
  </code></pre>
  
  <p>Now for the plot:</p>
  
  <pre><code>library(ggplot2)
  ggplot(dat, aes(x=x, fill=as.factor(by))) + geom_bar(position="dodge") + theme_tufte()
  </code></pre>
  
  <p>This returns what I need; almost. Unfortunately, the first bar looks really weird, because it's binwidth is twice as high (due to the fact that there are no zeros in "by" for "x"==1).</p>
  
  <p>Is there a way to reduce the binwidth for the first bar back to "normal"?
  <a href="https://i.stack.imgur.com/NIPl4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NIPl4.jpg" alt="enter image description here"></a></p>