Hi,
I was trying to use this new option as described in the
release notes of version 2.23_10, but the following macro:
{
f1=TF1("f1","x**3");
f2=TF1("f2","x**2");
f1->Draw();
f2->Draw("same");
h1=TH1F("h1","",100,0.,1.);
h2=TH1F("h2","",100,0.,1.);
h1->FillRandom(f1->GetHistogram(), 1000000);
h1->Draw();
TPaveStats *stats = (TPaveStats*)gPad->GetPrimitive("stats");
stats->SetName("h1stats");
h2->FillRandom(f2->GetHistogram(),1000000);
h2->Draw("sames");
}
fails with an error message:
root [0] .x testsames.C
<TCanvas::MakeDefCanvas>: created default TCanvas with name c1
Error: illegal pointer to class object stats 0x0 94 FILE:testsames.C
LINE:11
*** Interpreter error recovered ***
If I type this macro command by command it works.
Thanks,
Sergei Avvakumov
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:16 MET