I got some strange results trying to plot the histograms of a pretty standard random variable with ggplot.
RB = rbinom(10000000,100,.3)
qplot(RB)#histogram of the distrib with ggplot2. Assumes 30 buckets by default
dev.new()
hist(RB,breaks=30)#same with regular histogram
dev.new()
qplot(RB,binwidth=1)#if we force binwidth to 1 it seems to work
dev.new()
hist(RB,breaks=range(RB)[2]-range(RB)[1])
The result of the first call to qplot is quite odd. With the numbers of draws we expected the graph to show a smooth distribution.
I use ggplot2 version 1.0.0 and R 3.0.2