Skip to content
Prev 82663 / 398506 Next

superimpose density line over hist

On 13-Dec-05 Albert Vilella wrote:
Following up my earlier reply, and more in line with your precise
question above:

  alnlength<-rchisq(1000,4)
  hist(alnlength,breaks=0.25*(0:100))
  j<-density(rchisq(1000,4))
  lines(j$x,1000*0.25*j$y)

Best wishes,
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 13-Dec-05                                       Time: 15:59:50
------------------------------ XFMail ------------------------------