Hi,
Something similar is done in $ROOTSYS/tutorials/hist/transpad.C. I just ran it and saved it as a PS file. It is fine for me. Can you send a small running macro reproducing your problem ?
Cheers, O.Couet
-----Original Message-----
From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch]
On Behalf Of Pietro Cavalleri
Sent: Tuesday, June 16, 2009 10:54 AM
To: roottalk_at_lxbuild091.cern.ch
Subject: [ROOT] Problem with TPaveStats
Hello Rooters,
i have a problem with TPaveStats class. I'm drawing histograms and
TGraphs and before saving the canvas i need to
move the stat box in order to not cover a part of the histogram.
The result is fine when the canvas is popped out at the end of the
execution, but when i open the saved .ps file the stat box is empty.
TCanvas *c = new TCanvas("c","c",1);
...
h_mass->Draw();
TPaveStats *st2 =
(TPaveStats*)h_mass->GetListOfFunctions()->FindObject("stats");
st2->SetX1NDC(0.2); //new x start position
st2->SetX2NDC(0.15);
st2->Draw();
...
gPad->Update();
c->SaveAs(myfilePS);
Can anyone tell me where i'm wrong?
thanks in advance
Pietro Received on Tue Jun 16 2009 - 11:03:55 CEST
This archive was generated by hypermail 2.2.0 : Tue Jun 16 2009 - 23:50:01 CEST