From dmurdoch at pair.com  Thu Oct  2 17:08:38 2003
From: dmurdoch at pair.com (Duncan Murdoch)
Date: Thu Oct  2 22:08:07 2003
Subject: [Rd] hist (PR#4395)
In-Reply-To: <200310021848.h92ImX0P017935@pubhealth.ku.dk>
References: <200310021848.h92ImX0P017935@pubhealth.ku.dk>
Message-ID: <s41pnv4ji1bub6b9kkuhkqj4jfunlravhg@4ax.com>

On Thu, 2 Oct 2003 20:48:33 +0200 (MET DST), mittal@math.arizona.edu
wrote :

>
>It is not really a bug but a strange choice.

Please don't post discussion to r-bugs.  Each post to r-bugs ends up
in the bug repository, and requires manual handling.

> When the option freq=F chosen, hist
>should plot relative frequency. It plots proportional to relative frequency by
>the factor of bin width. Is there a reason for this? A more normal choice seems
>to be to have it independent of the bin width. 

No, that would result in misleading plots.  For example, if one bar is
twice as wide as another but they are the same height, then the
natural interpretation is that the wide bar represents twice as many
observations, or twice the probability.  This is the way densities
work, and is how histograms should work.  (However, since not everyone
interprets histograms this way, it's safest not to use variable width
bars.)

If you just want to plot some bars where the area of the bar has no
meaning, use barplot() instead of hist().

Duncan Murdoch


[Rd] hist (PR#4395)
Duncan Murdoch