[R] Thin bars in R hist !!??

2010-01-03 Thread Whalojazz
Hi, I am trying to plot a histogram with my dataset that has 68 elements, 67 of which are zero and the last one is 18. It can be reproduced as follows: x-array(0, dim=(68)) x[1] = 18 I am trying to plot its histogram using: hist(x, breaks=10, xlim=c(0, 100), axes=F) axis(2, at=seq(0, 70, 5))

Re: [R] Thin bars in R hist !!??

2010-01-03 Thread Whalojazz
Peter Ehlers wrote: Just seting breaks=2 should fix your 'issue'. But what could such a histogram possibly tell anyone? Unless this is a pathological case in a more elaborate analysis, I can't see any sense in what you're doing. Yes it did! However, this requires that I explicitly set

Re: [R] Thin bars in R hist !!??

2010-01-03 Thread Whalojazz
Peter Dalgaard wrote: Were you perhaps looking for hist(x, breaks=seq(0, 100,10))? (Notice that if breaks is a single number, it will generate breaks based on range(x), not xlim.) Great! That's *exactly* what I needed. Thanks a lot! -- View this message in context: