title: geom_bar not showing every values
body: <p>I want to draw a bar plot, with <code>ggplot</code> and <code>geom_bar</code>, but it seems that the behavior of <code>geom_bar</code> is not consistent. I don't understand why.</p>
  
  <p>My data is a time series of precipitations:</p>
  
  <pre><code>library(ggplot2)
  library(data.table)
  library(lubridate)
  set.seed(42)
  dt1 &lt;- data.table(dateHeure=seq(ymd_hms("2014-06-04 13:30:00"), 
                  ymd_hms("2014-10-20 08:30:00"), by='1 hour'),
       rain=sample(c(rep(5,15), rep(10,15), rep(20,10), 
               rep(30, 5), 40, rep(0, 3262)))) 
  </code></pre>
  
  <p>Then i plot it, and not all the data appears... Why is some data missing?</p>
  
  <pre><code>ggplot(data=dt1)+
  geom_bar(aes(x=dateHeure, y=rain),        
        stat="identity", 
        fill="blue")  # doesn't work!
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/az2Cm.png" alt="wrong plot"></p>
  
  <p>But if i add the variable <code>color</code> in <code>aes</code>, then the plot is correct! </p>
  
  <pre><code> ggplot(data=dt1)+
  geom_bar(aes(x=dateHeure, y=rain, color="rain"),     
   stat="identity",
   width=0.2)  # work properly
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/cavmn.png" alt="ok_plot"></p>
  
  <p>So someone know why <code>geom_bar</code> doesn't work properly without <code>color</code>? Because i can't rely on it if sometimes not all the data is correctly plotted...</p>
  
  <p>thanks!</p>
  
  <p><strong>edit:</strong> to respond to @eipi10, i added the plots. The strange thing is that when i resize the plot window in the first case, the data which is plotted changes!</p>