Skip to content
Prev 83126 / 398506 Next

Plot problems: xlim

Please give an example of your data.

set.seed(231) 
morp <- rnorm(20)
range(morp)
[1] -2.311664  1.650254

You can plot 2 histograms, one of them with the extreme value:

par(mfrow=c(2,1))
hist(morp, breaks=10, freq=F)
lines(density(morp))
par(mfrow=c(1,2))
hist(morp, breaks=10, freq=F)
lines(density(morp))
hist(morp, breaks=seq(min(morp), max(morp), length=10), xlim=c(-3, 13), 
freq=F)
lines(density(morp))
abline(v=7.5, lty=3)


Ronnie Babigumira a ??crit :