title: Unexpected ggplot output when trying to weight histogram
body: <p>I am trying to create a histogram and weight the output by a variable.  In this example, I would like a histogram of <code>value</code> weighted by <code>amount</code>. I did search prior posts but this did not seem to address my issues. </p>
  
  <p>I have 2 problems I am trying to solve:</p>
  
  <ol>
  <li><p>I expected different weighted results in the histogram.  I expected the "2" value to have a bar equal to 16%, the "3" value to have a bar equal to 24%, the "4" value to have a bar of 18%, and the "5" value to have a bar of 42%.</p></li>
  <li><p>I don't know why a black bar at "0" value equal to 100% shows up in the histogram.</p></li>
  </ol>
  
  <p>Here is the reproducible example:</p>
  
  <pre><code>library(ggplot2)
  
  amount &lt;- c(rep(0.02, 50), rep(0.03, 50))
  value  &lt;- c(rep(2, 20), rep(3, 30), rep(4, 15), rep(5, 35))
  my_df  &lt;- data.frame(amount, value)
  
  xvar   &lt;- my_df$value
  weight &lt;- my_df$amount
  
  histogram &lt;- ggplot(my_df, aes(xvar)) 
  histogram &lt;- histogram + geom_histogram(aes(weight))
  histogram &lt;- histogram + geom_histogram(binwidth=0.25, 
                           colour="black", fill="white")
  plot(histogram)
  </code></pre>