Hello Jayoung, Do not use TCanvas::GetPadDivision but TPad::Divide, eg: Root > c1 = new TCanvas("s1","Histogram",700,500); Root > c1->Divide(2,2); // divide c1 in 2x2 subpads Root > c1->cd(1); // to change current pad to top left pad For more info, see TPad::Divide Rene Brun On Fri, 17 Dec 1999, Jayoung Wu wrote: > Hi, > > I tried to divide canvas into 2 by 2. When I clike canvas window to get > the canvas menu and clike divide in canvas menu(I mean using GUI) it > works. However, when I type the command, "c1->GetPadDivision(2,2)" it > does not work. When I execute the following commands, it draws histogram > on original canvas c1 instead of on the 1st pad in canvas. > > root [0] TFile file("../ntuple.root"); > root [1] c1 = new TCanvas("s1","Histogram",700,500) > (class TCanvas*)0x0 > root [2] c1->cd(1); > root [3] c1->GetPadDivision(2,2); > root [4] c1->cd(1); > root [5] si_adc.Draw("a0","iny==8 && inx==10"); > > Could you help me? > > --- > Thanks, > Jayoung > >
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:44 MET