hi
i have this code :
lam1=6
n=100
X1=rexp(n,rate=lam1)#realisations
d=0.05
s1=seq(from=0, to=1.5, by=d)
dev.off()
h1=hist(X1,
breaks=s1, freq=F, col="blue", xlim=c(0,1.5), ylim=c(0,4) )
yv1=dexp(x=s1,rate=lam1)
par(new=TRUE)
matplot(x=s1,y=yv1, type="l", col="green", lwd=2 , axes=F,
las=1, xaxs = "i", yaxs = "i",xlab="",ylab="",
xlim=c(0,1.5), ylim=c(0,4))
here the result : [i am sorry i am not authorized to post either images nor dropbox links]
my question :
would you have an idea why the y=0 axis seems not to be the same for the hist than for the matplot ?
Vinz