Skip to content
Prev 311100 / 398503 Next

lines density

On 12-11-17 5:38 AM, bgnumis wrote:
You need to set ylim in your call to hist().  You can do it by trial and 
error, or compute the numbers first via

h <- hist(MCT[,2], plot=FALSE)

and set

ylim <- range(c(0, h$density, density(MCT[,2])$y))

before you plot:

hist(MCT[,2], probability=TRUE, ylim=ylim, xlab=" ", ylab="Max", main="M 
distribution")
lines(density(MCT[,2]), lwd = 2)

Duncan Murdoch