MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Hystogram

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94727] Re: [mg94684] Hystogram
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 21 Dec 2008 05:55:23 -0500 (EST)
  • Reply-to: hanlonr at cox.net

xmin = 0;
xmax = 100;
dataCount = 150;
binCount = 15;

data = RandomReal[{xmin, xmax}, dataCount];

h = Histogram[data, binCount,
   LabelingFunction -> Above]

f1 = Cases[h, Style[c_?NumericQ, _] :> c,
   Infinity]

{7,8,9,8,9,13,4,15,12,9,11,18,5,10,12}

f2 = BinCounts[data,
   {xmin, xmax, (xmax - xmin)/binCount}]

{7,8,9,8,9,13,4,15,12,9,11,18,5,10,12}

And @@ {Total[f1] == dataCount,
   Total[f2] == dataCount, f1 == f2}

True



Bob Hanlon


On Sat, Dec 20, 2008 at 11:25 AM , paolo wrote:

> Dear All,
> I need help. Given a List of N  measurements . Hystogram[List, m bins]
> plots the frequency  in each of the m bins in  which I divided the
> whole range of my data.
> This goes well . What I do not know is: how to recover is the actual
> 15 numbers that certainly are computed by Histogram   before they  get
> plotted ?


  • Prev by Date: Re: Display of Alternatives Symbol in Notebooks in Version
  • Next by Date: Re: Display of Alternatives Symbol in Notebooks in Version 7
  • Previous by thread: Re: Hystogram
  • Next by thread: please help me solving