Re: Histogram
- To: mathgroup at smc.vnet.net
- Subject: [mg112699] Re: Histogram
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Mon, 27 Sep 2010 05:47:58 -0400 (EDT)
hist1 = Histogram[RandomReal[
NormalDistribution[0, 1], 200]]
Cases[hist1,
RectangleBox[{x1_, 0}, {x2_, y_}] ->
{(x1 + x2)/2, y}, Infinity]
For multiple histograms you will have to split the data. For example,
data1 = RandomReal[NormalDistribution[0, 1], 500];
data2 = RandomReal[NormalDistribution[3, 1/2], 500];
hist2 = Histogram[{data1, data2}]
Split[Cases[hist2, RectangleBox[{x1_, 0}, {x2_, y_}] ->
{(x1 + x2)/2, y},
Infinity], First[#1] < First[#2] &]
Bob Hanlon
---- Themis Matsoukas <tmatsoukas at me.com> wrote:
=============
How can I access the {x,y} values that are plotted by Histogram?
Themis