PaveText on Pad

I have a strange problem. I’m trying to put TPaveText on a Pad:

TCanvas *c6 = new TCanvas("c6","new alltogether",1,1,800,1200); c6->Divide(1,3); c6->cd(1); TH1F *hr1 = c6->GetPad(1)->DrawFrame(potent0,0.,potent1,1.1*maxplot); cout << "are we here yet?" << endl; hr1->SetXTitle("Potent position [#mum]"); hr1->SetYTitle("Amplitude"); TMultiGraph *Mgr = new TMultiGraph(); Mgr->Add(grIn,"lp"); Mgr->Add(grOut,"lp"); Mgr->Draw(); TPaveText *tt = new TPaveText(0.05,0.90,0.95,1.0,"NDC"); tt->AddText(fname); tt->Draw();

when I do this, I get the PaveText, but the Multigraph and the frame disappears. Why?
When I poot TPaveText before drawing the multigraph, the frame disappears.
root version 5.20.


Could you post a running script showing the problem?


Here it is.
I execute it by:
root > .x ShowScan416.C(“data.file”)
It takes 2 minutes to execute.
My problem is in line 648.


ShowScan416.C (20.6 KB)
BWSINJ_-SPS.BWS.41677.H_ROT-ALL-Logging-_2008.10.23-01.12.33.txt (565 KB)

I think your post is not complete. I get:

root [0] .x ShowScan416.C("DATA_416/BWSINJ_-_SPS.BWS.41677.H_ROT_-_ALL_-_Logging_-_2008.10.23-04.06.08.txt")
Error in <TROOT::Macro>: macro gra.C not found in path .:/home/couet/root/macros:
file error

" gra.C", is missing, can it be commented ?

Sorry, yes it can be commented.

I see the TPaveText with your macro. See the attached gif.

You have many problems in your code. Try to compile it with ACLIC using the version of your code in attachment
root > .L ShowScan416.C+

ShowScan416.C (20.7 KB)