Problem with the TFrame color

Hello everybody,

I encountered a problem with the TFrame. I would like to remove the black frame around the TH1 histogram, and if I put this code to the interpreter line-by-line, everything works well:

TH1F *h=new TH1F("h","h",10,0,10);
h->Draw("histo");
gPad->GetFrame()->SetLineColor(0);
gPad->Modified();

but when I write absolutely same commands in macros, the frame color does not changes.
Any ideas?
_ROOT Version: 6.22/06
Platform: x86-64
Compiler: g++


gPad->Modified(); gPad->Update(); // make sure it's really (re)drawn
gPad->GetFrame()->SetLineColor(0);
gPad->Modified(); gPad->Update(); // make sure it's really (re)drawn

It works! Many thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.