[R] Fwd: Why do histogram bars vary their width?

James Rome jamesrome at gmail.com
Sat Dec 26 16:38:37 CET 2009


I did

histogram(~(Arrival4) | as.factor(Hour), type="count",
breaks=16,ylab="Arrival Count",
  xlab="Arrival Rate/4",main="Friday EWR A22R D22L Configiration",
  layout=c(6,4), par.strip.text=list(cex=0.7))

Why do I get plots with different bar widths? See http://dl.dropbox.com/u/537118/Friday.pdf.

Although

bins=seq(-.5,15.5,1)

histogram(~(Arrival4) | as.factor(Hour), type="count", breaks=bins,ylab="Arrival Count",
  xlab="Arrival Rate/4",main="Friday EWR A22R D22L Configiration",
  layout=c(6,4), par.strip.text=list(cex=0.7))

seems to work properly.

Thanks,
Jim Rome




More information about the R-help mailing list