[R] Plotting frequency curve over histogram

Rolf Turner r.turner at auckland.ac.nz
Thu Dec 10 01:28:40 CET 2009


On 10/12/2009, at 12:52 PM, Gaurav Moghe wrote:

> Hello,
>
> This is a problem for which there seem to be several solutions  
> online, but
> not really. My question was about plotting a curve over the  
> histogram. All
> the previous posts and messages talk about generating a *density
> histogram*using (freq=F) and then plotting the density curve. However,
> I find that
> that seriously distorts my data and the plot becomes confounding to  
> the
> viewer.

	How does this ``distort'' your data?  You are simply changing
	the scale on the y-axis.

> I was wondering if there's a way to do the following 2 things:
> 1) Plot both histogram and the overlying frequency curve in one plot

	If you want to keep your histogram on the ``count'' scale,
	just multiply your density curve by the constant by which
	you would have divided the histogram values to change
	counts into density values.

> 2) Plot multiple frequency curves in a single plot

	?lines
>
> I have been using the "hist" function for my job.
>
> I'd appreciate if anyone could help me with the solution

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}




More information about the R-help mailing list