title: ggplot binwidth not working
body: <p>I have just started to learn R and gglpot, so please bear with me.</p>
  
  <p>I am trying to see price per carat in the <code>diamonds</code> dataset.</p>
  
  <p>I first used </p>
  
  <pre><code>ggplot(diamonds, aes(x = price, y = carat)) + geom_histogram()
  </code></pre>
  
  <p>then I got an error <code>Error: stat_bin() must not be used with a y aesthetic.</code></p>
  
  <p>Next I learned the <code>stat = "identity"</code> and used </p>
  
  <pre><code>ggplot(diamonds, aes(x = price, y = carat)) + geom_histogram(stat="identity")
  </code></pre>
  
  <p>to get <code>Warning: Ignoring unknown parameters: binwidth, bins, pad</code> and a graph with too many bins.</p>
  
  <p>I tried to set the binwidth as </p>
  
  <pre><code>ggplot(diamonds, aes(x = price, y = carat)) + geom_histogram(stat="identity", binwidth = 1000)
  </code></pre>
  
  <p>but still the warning persists and I get too many bins.</p>
  
  <p>What I am doing wrong? Any help is appreciated. Thanks in advance.</p>