[R] histogram breaks as labels

Albert Vilella avilella at gmail.com
Mon May 8 14:01:49 CEST 2006


Hi all,

I would like to know if there is a way to have the diplay the breaks
of the hist (as myhist$breaks here in the example) as the labels,
instead of the myhist$counts:

input = rpois(1000,5)
myhist = hist(input, breaks = 15, labels=TRUE, axes=FALSE)

So that, instead of having:

"94 140 187 181 145 117  68  42  15   5   1   5"

on top of the columns, I have:

"1  2  3  4  5  6  7  8  9 10 11 12 13"

as in myhist$breaks.

Thanks in advance,

    Albert.




More information about the R-help mailing list