Re: Status Box

From: basil@hbaxp04.mppmu.mpg.de
Date: Thu Jul 03 1997 - 11:49:54 MEST


>> 
>> Hello,
>> 
>> I have again a very simple question. How can I draw a histogram without the
>> status information about number of entries, mean,....
>> How can I select the information I want to print there?
>> The second part of my question is how can I print the Fit Results in such a
>> status box?
>> It seems that is has something to do with TStyle, but I don't know how to access
>> it.
>
>You can enable/disable the statistics box or fit in a canvas
>by activating/deactivating the corresponding option in the canvas
>"Option" menu.
>.You can also set the equivalent mode via
>  gStyle->SetOptStat(int mode)
>  gStyle->SetOptFit(int mode)
>
>In version 1.01/07 coming this week, I have added additional options.
>- The type of information printed in the histogram statistics box
>  can be selected via gStyle->SetOptStat(mode).
>  The parameter mode can be = nemruo  (default = 111100)
>    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
>  Example: gStyle->SetOptStat(11);
>           print only name of histogram and number of entries.
>
>Rene Brun

Thanks for the information. But how can I set the option in a C++ program which is linked with the 
root library?
For example:
 Canvas1 = new TCanvas("Vertex Fitting", "Vertex Fitting",200,10,700,840);
Pad1 = new TPad("MainPad1","The first Pad "   ,0.  ,0.40,0.50 ,0.80 ,CanvasColor);
Pad1->cd();
 sampleHist->Draw();

I could not find any inheritance of TStyle in TCanvas or TPad or TH1F... 

Cheers Basil



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