Re: [R] Histogram

About this list Date view Thread view Subject view Author view Attachment view

From: Uwe Ligges (ligges@statistik.uni-dortmund.de)
Date: Tue 25 May 2004 - 20:57:49 EST


Message-id: <40B326AD.20602@statistik.uni-dortmund.de>

Cristian Pattaro wrote:

> Dear all,
>
> I have a surprising problem with the representation of frequencies in a
> histogram.
>
> Consider, for example, the R code:
>
> b<-rnorm(2000,3.5,0.3)
> hist(b,freq=F)
>
> When I plotted the histogram, I expected that values in the y-axis (the
> probability) varied between 0 and 1. Instead, they varied within the
> range 0-1.3.
>
> Have you got any suggestion for obtaining a correct graph with
> probability within the range 0-1?

Note that width * height (and *not* the height solely) corresponds to
the probability in a histogram.

Uwe Ligges

> Thank you very much!
>
> Bests
> /Cristian/
>
> =============================================
> Cristian Pattaro
> =============================================
> Unit of Epidemiology & Medical Statistics
> Department of Medicine and Public Health
> University of Verona
>
> http://biometria.univr.it
> cristian@biometria.univr.it
> =============================================
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.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://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:12 EST