Hi,
I've been trying to display only the name of my histograms, with:
gStyle->SetOptStat(1)
however, I keep getting the same output. Why becomes obvious when looking
at THistPainter::PaintStat:
if (stats) {
dofit = stats->GetOptFit();
dostat = stats->GetOptStat();
} else {
dofit = gStyle->GetOptFit();
}
if (!dofit) fit = 0;
if (dofit == 1) dofit = 111; // <--- overriding my choice
if (dostat == 1) dostat = 1111; // <--- overriding my choice
...
So if the SetOptStat(1) (just show the name) is being over-ridden and set
to whatever the hard-coded default is. I think this is just plain wrong...
Instead, declare in the TStyle class
void SetOptStat(Int_t stat = 1111);
void SetOptFit(Int_t fit = 111);
or better,
static Int_t def_stat = 1111;
static Int_t def_fit = 111;
void SetOptStat(Int_t stat = def_stat);
void SetOptFit(Int_t fit = def_fit);
Could this be implemented?
Of course, if we were re-writing everything, we would have all sort of
constants defined, so we could do:
gStyle->SetOptStat(TStyle::Show_Name | TStyle::Show_Mean);
but I think that's a bit much to ask for.
Thanks,
Rob Feuerbach
--
/***************************************************
* Robert Feuerbach feuerbac@ernest.phys.cmu.edu *
* CMU Physics Department (412) 268-2772 *
* Pittsburgh, PA 15213 FAX: (412) 681-0648 *
***************************************************/
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:40 MET