Skip to content
Prev 221919 / 398500 Next

adding one line to a plot

Thanks a lot, Peter, that's exactly what I was looking for:

plot(density(tstat),xlim=c(-5,8),ylim=c(0,.4),lwd=2,col='red')
z <- tstat[order(tstat)]
lines(z,dt(z,df=18),col='blue')
legend(4,.3,c("exact","t(18)"),lwd=c(2,1),col=c('red','blue'))

Dimitri
On Mon, May 24, 2010 at 1:26 PM, Peter Ehlers <ehlers at ucalgary.ca> wrote: