Re: [ROOT] Statistics Box

From: Rene Brun (Rene.Brun@cern.ch)
Date: Fri Mar 23 2001 - 10:11:00 MET


Hi Lars,

When doing tree.Draw("y:x") the stats box is not created. The reason is that
tree.Draw does not fill a 2-d histogram by default. It draws the original points
y[i] vs x[i] with the original precision in the pad directly.

You can force tree.Draw to fill a 2-d histogram, eg
  TH2F h2("h2","my hist",40,-4,4,40,0,100);
  tree.Draw("y:x>>h2");

The histogram h2 will be filled and you will get the corresponding stats box.

Rene Brun


Lars Ewell wrote:
> 
> To Whom it May Concern,
> 
>         After chaining together a number of histograms, I
> have been looking over some plots.  The 'Statistics Box'
> in the upper right hand corner of the plot contains
> useful information (e.g. RMS, mean, etc.).
> 
>         Unfortunately, when I then plot two dimensional
> scatter plots from the same chain, the box has vanished.
> I played around some with the 'SetOptStat()' member
> function but have not been able to get it displayed
> on 2D plots.
> 
>         Any suggestions?
> 
>         Thanks in advance.
> 
>         regards,
> 
>         Lars Ewell
> --
> ______________________________________
>  Lars Ewell
>  Brookhaven National Laboratory
>  PHENIX Group
>  Physics Dept. 510C
>  Upton, NY 11973
> 
>  ewell@bnl.gov
>  Phone (631)344-7070
>  FAX   (631)344-3253
>  www   http://ewell.rhic.bnl.gov/~ewell
> _____________________________________



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:40 MET