Hi Dirk,
The "stats" box is regenerated every time the pad is repaint in order to reflect
all possible changes in the histogram. You can , however, add one or more line
in the following way, assuming the stats box is connected to histogram h:
TPaveText *stats = (TPaveText*)gPad->GetPrimitive("stats");
stats->SetName("Mystats");
h->SetStats(0);
stats->AddText("my text line");
stats->SetTextColor(kBlue);
gPad->Modified();
gPad->Update();
Rene Brun
> Dirk Dünkelmann wrote
> Hi,
>
> I'd like to add a line to the stats box like
>
> gPad->Update();
> TPaveText *stats = (TPaveText*)gPad->GetPrimitive("stats");
> stats->AddText("my text line");
> stats->SetTextColor(kBlue);
>
> The text colour changed, but no extra line will be printed.
> My RooT version is 2.25/03.
> Thank you,
>
> Dirk
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:33 MET