Hello,

E.g. with lines() or add a new plot to the current plot with par(new = TRUE)  
(and set equal xlim and ylins´s in the plot function)

r <- rnorm(100)
hist(r,freq=FALSE)
lines(density(r))

Best,
Matthias

> 
> Is there any neat way to add a curve (frequency function or 
> the like) to a histogram or other plots? I haven't found one yet...
> 
> Robert
> 
> ______________________________________________
> [email protected] mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read 
> the posting guide! http://www.R-project.org/posting-guide.html
>

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to