Re: [R] Add function to histogram?

From: TEMPL Matthias <Matthias.Templ_at_statistik.gv.at>
Date: Wed 21 Sep 2005 - 16:22:52 EST


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
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read
> the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Sep 21 16:30:57 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 17:33:27 EST