[R] superimpose density line over hist

Albert Vilella avilella at gmail.com
Tue Dec 13 14:23:17 CET 2005


Hi all,

I'm trying to superimpose a rchisq density line over a histogram with
something like:

hist(alnlength)
lines(density(rchisq(length(alnlength), 4)),col="red")

But the rchisq line won't appear anywhere,

Anyone knows what I am missing here?

Thanks in advance,

    Albert.




More information about the R-help mailing list