Skip to content

hist() and bar spacing

3 messages · Amelie LESCROEL, Uwe Ligges, Jim Lemon

#
Amelie LESCROEL wrote:
You data follows a *discrete* distribution, hence a barplot seems to be 
more appropriate here:

barplot(table(testtest))

Uwe Ligges
#
Amelie LESCROEL wrote:
Hi Amelie,

Them's the breaks. Try this:

hist(test,breaks=-1:7)

and you should get what you want.

Jim