This histogram is really ugly:
hist(rbinom(10000, 20000, 0.0001),freq=F,right=F)
Run Code Online (Sandbox Code Playgroud)
I don't want spaces between my bars. I tried different breaks= methods but they all produce similar results. Any ideas?
I also want each bin value (or mean values )to be printed under the center of it's bar.
这是一种使标签居中的方法:
x <- rbinom(1000, 2000, 0.001)
tmp <- hist(x, breaks=0:(max(x)+1), xaxt="n", right=FALSE, freq=FALSE)
axis(1, at=tmp$mids, labels=0:max(x))
Run Code Online (Sandbox Code Playgroud)