Skip to content
Prev 312859 / 398503 Next

Histogram plot help

Hello,

I can't say I understand your graph but as for the abline not showing 
up, it's outside the clipped region so it shouldn't. If you want it to 
show up, in the previous line, and after the hist() call, include

clip(2, -2, usr[3], usr[4])

As for the decimals, those are normal, have you seen the data you're 
ploting? To have whole numbers use the arguments ylim and yaxt = "n" in 
the first call to hist and axis(2, ...) afterward. Something like

hist(x, xlim=c(-4,4),ylab="Prevalence",prob=T,lwd=3,las=1, ylim = c(0, 
3), yaxt="n")
axis(2, at = 0:3)


Oh, and you forgot prob = TRUE in the other calls to hist().

Hope this helps,

Rui Barradas

Em 03-12-2012 22:21, YAddo escreveu: