While on the subject of titles.... I have a simple TF2 and I want to
change the associated TPaveText from holding the formula to holding a
text label. Here is a script:
{
gROOT->Reset();
TCanvas* canvas = new TCanvas("oscprob","Survival Probability");
canvas->cd();
oscprob = new TF2("oscprob","1-sin(1.27*y*731.0/x)^2",0.0,10.0,1e-3,10e-3);
oscprob->Draw("COL");
canvas->Modified();
canvas->Update();
TPaveText* pt = (TPaveText*) canvas->GetPrimitive("title");
pt->Clear();
pt->AddText("Survival prob");
}
However the formula remains. I have also tried various interactive
maneuvers on the TPaveText. I can succeed in clearing or appending
the text, but not replacing it. What am I doing wrong?
Thanks,
-Brett.
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:53 MET