[ROOT] bordermode problem ?

From: Rene Scholte (r34@nikhef.nl)
Date: Tue Jan 16 2001 - 14:14:30 MET


Hello Rooters,

Attached is a small macro which demonstrates the behaviour of
Get en SetBordermode which I don't quite understand.

When I set the bordermode of the frame to zero, it stll insists that teh
bordermode is 1.
On the histograms it is not that obvious, but when I draw a TGraphError
in the Pads I don't
seem to get rid of the bordermode==1.

It can very well be that I don't understand exactly the relationship
between
pads, frames and histograms or graphs.
Any suggestions are welcome...

the ouput (apart from a canvas with 2 histograms) of the attached macro
is :

root [0] .x testje_frame.c
bordermode is 1
bordermode now is 1
root [1] .q



--
Rene Scholte
NIKHEF (Nat. Inst. for Nuclear and High Energy Physics)
Phone +31 20 592 5071
email : r34@nikhef.nl





{
gROOT->Reset();
TCanvas *c1 = new TCanvas("hai","hai",800,600);
c1.Divide(1,2);
TRandom *rand = new TRandom();
TH1F *hist1 = new TH1F("hist1","hist1",100,0,1);
TH1F *hist2 = new TH1F("hist2","hist",100,0,10);
for (Int_t i=0;i<100;i++)
 { hist1->Fill(rand->Rndm(10));
   hist2->Fill(rand->Rndm(11)*10);
 }

c1.cd(1);
cout << "bordermode is " << gPad->GetFrame()->GetBorderMode() << endl;
gPad->GetFrame()->SetBorderMode(0);
cout << "bordermode now is " << gPad->GetFrame()->GetBorderMode() << endl;
hist1->Draw();
c1.cd(2);
gPad->GetFrame()->SetBorderMode(0);
hist2->Draw();
} 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:33 MET