Re: Stats in TH1

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Nov 16 1999 - 18:50:20 MET


Hi Olivier,
In the "Stat" box, you can display the following information
(extracted from THistPainter::PaintStat):
// The type of information printed in the histogram statistics box
//  can be selected via gStyle->SetOptStat(mode).
//  The parameter mode can be = iourmen  (default = 0001111)
//    n = 1;  name of histogram is printed
//    e = 1;  number of entries printed
//    m = 1;  mean value printed
//    r = 1;  rms printed
//    u = 1;  number of underflows printed
//    o = 1;  number of overflows printed
//    i = 1;  integral of bins printed
//  Example: gStyle->SetOptStat(11);
//           print only name of histogram and number of entries.

To get the integral of bins in the range, do, eg:
   gStyle->SetOptStat(1111111);

then use the slider on the axis (it works for 1-D and 2-D histograms).

The PainStat function invokes TH1::Integral

Rene Brun


Olivier Meplan wrote:
> 
> Hi Rooters!
> a)I want to know if it is possible to obtain the number of entries of an
> histogram for a given Range axis in the Stat box? Indeed when I make a
> zoom (with mouse) the mean and RMS change according to the range axis
> but the entry number is the total number of entries.
> b) In the same spirit how can I make a TDialogCanvas for TH1 that can
> call the TH1::Integral function?
> Thank you
> Olivier Meplan



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:43 MET