Re: getting data for Histogram
- To: mathgroup at smc.vnet.net
- Subject: [mg80458] Re: [mg80428] getting data for Histogram
- From: Sseziwa Mukasa <mukasa at jeol.com>
- Date: Thu, 23 Aug 2007 01:00:49 -0400 (EDT)
- References: <200708220844.EAA08708@smc.vnet.net>
On Aug 22, 2007, at 4:44 AM, Arkadiusz.Majka at gmail.com wrote:
> Hi,
>
> 3 years ago the following problem was given
>
> "I assume that in the process of creating a Histogram plot,
> Mathematica must be calculating a list of BinCounts -- but how can
> I get at that
> list immediately after making and displaying the histogram? "
>
> Do you know the answer?
In version 6 BinCounts is now an function.
Otherwise the result of Histogram is a Graphics object, the bins can
be obtained from the parameters to the Rectangle expressions in that
that object which can be obtained as follows:
<< Graphics`Graphics`
<<Statistics`NormalDistribution`
obj = Histogram[RandomArray[NormalDistribution[], 100]];
bins=Cases[obj, Rectangle[__], Infinity]/.Rectangle[{l_, b_}, {r_,
t_}] -> {l, r}
Regards,
Ssezi
- References:
- getting data for Histogram
- From: Arkadiusz.Majka@gmail.com
- getting data for Histogram