On Mon, Nov 30, 2009 at 12:01:12PM +0100, Trafim wrote: > Dear all, > > I cannot find a function which would allow drawing hist and density on the > same graph. > > x <- seq(1,40,1) > y <- 2*x+1+5*rnorm(length(x)) > > hist(y,freq = FALSE) > plot(density(y))
The package descr has the function histkdnc() which plots a histogram with kernel density and normal curve. I mantain the package but this function was written by Dirk Enzmann. -- Jakson ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.