> When I had breaks = 18, I get total number of cells as 16, which is > same when I put breaks = 20 > > In the 2nd case I was expecting total number of cells (i.e. bars) as > 20 i.e. if I understand the documentation correctly I should expect > total number of cells (bars) should be same as breaks argument in > hist() function.
You do not _quite_ understand the documentation correctly. ?hist says "In the last three cases the number is a suggestion only; as the breakpoints will be set to 'pretty' values" That includes specification of a single number of breaks. > How to make that happen? Specify a vector of breaks with 20 intervals (21 values). For example, breaks=seq(-4500000, 3500000, length.out=21) This gives a bin width of 4e5. S Ellison ******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}} ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.