On Thu, Jan 21, 2010 at 8:47 AM, Roslina Zakaria <zroslina@yahoo.com> wrote:

> Hi r-users,
>
> I try to draw histogram (in terms of probabilty) and superimpose with the
> gamma pdf. Using this code below I can get the plots BUT the y scale for the
> density is out of scale.  How do I change the y-axis scale to max 1?
> Another thing, how I do draw smooth line rather that points?
>
> Nota that my observed data is hume_pos and the fitted data is rgam1.
>
> hist(hume_pos,prob=TRUE)
> points(density(rgam1), add=TRUE, col="red")
>

Check the thread "Histogram and Density on the the same graph" from 11/30/09
- there is the questions discussed and also includes a link to an earlier
thread.

Rainer



>
> Thank you so much for your help.
>
>
>
>
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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.
>
>


-- 
NEW GERMAN FAX NUMBER!!!

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology,
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Cell:           +27 - (0)83 9479 042
Fax:            +27 - (0)86 516 2782
Fax:            +49 - (0)321 2125 2244
email:          Rainer@krugs.de

Skype:          RMkrug
Google:         R.M.Krug@gmail.com

	[[alternative HTML version deleted]]

