Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Histogram with more than one dataset

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61049] Re: Histogram with more than one dataset
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Sat, 8 Oct 2005 02:49:42 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 10/7/05 at 3:38 AM, kristophs.post at web.de (kristoph) wrote:

>Due to result comparison it would be very neat if it is possible to
>have more than one dataset in a histogram. What I me is a way to
>superimpose the 3 Histogram I have and compare them, to see
>differences.

It is possible to overlap histograms. For example,

<<Graphics`
a = Table[Random[],{100}];
b = Table[Random[]+.25,{100}];

histA = Histogram[a, DisplayFunction->Identity];
histB = Histogram[b, BarStyle->Blue, DisplayFunction->Identity];

then

Show[a,b];

but this obsures the fact data set b doesn't extend to 0. Alternatively,
you could do

Show[b,a];

to combine the plots. But now the fact data set a doesn't extend past 1 is obscured.

Quite frankly, histograms are not that useful for comparing data sets. You would probably be better served using the functions in Statistics`StatisticsPlots` (here I am assuming you have version 5.x or later of Mathematica).

Contrast

<<Statistics`
BoxWhiskerPlot[data1,data2];

with the overlapped histograms. The box and whisker plot clearly shows the two data sets have similar variation with a shifted range. This function easily handles n data sets.

Another useful plot for comparing two data sets is QuantilePlot.

For example,

QuantilePlot[data1,data2];

results in a scatter plot that is parallel to the reference line but shifted from it. This indicates the difference in the two data sets is a shifted location.
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Globally limiting precision or accuracy
  • Next by Date: Re: FortranForm of Integers and Reals
  • Previous by thread: Re: Histogram with more than one dataset
  • Next by thread: How to plot solutions of equations with Mathematica?