Hi, Rene: There are 4 pads in the example I gave in my previous email, in that case your suggestion should work. But indeed I am dealing with 9 pads, :-( your solution won't work for it: ------------- | 1 | 2 | 3 | ------------- | 4 | 5 | 6 | ------------- | 7 | 8 | 9 | ------------- Any ideas? Thanks! Aihong On Thu, 27 Sep 2001, Rene Brun wrote: > Aihong, > > Do not set the RightMargin for pads 2 and 4 > > Rene Brun > > On Thu, 27 Sep 2001, Aihong Tang wrote: > > > Hi, rooters: > > > > I wanna draw a few histograms together without margin between them, > > following macro could allow me to do that, but the drawback is that the > > plotting area in histograms with axis labels is smaller than that of > > histogram without axis labels, since some area along the left and bottom > > edge has to be left for labels/titles. > > > > --------- > > | 1 | 2 | area 1,3,4 is smaller than area 2. > > --------- > > | 3 | 4 | > > --------- > > > > Does anybody know a solution? > > > > Thanks! > > > > Aihong > > P.S. I am using ROOT 3.00.06 > > > > { > > gROOT->Reset(); > > TCanvas c1("c1","multipads",700,900); > > gStyle->SetPadBorderMode(0); > > Float_t small = 1e-5; > > c1.Divide(2,2,small,small); > > TH2F h1("h1","test1",10,0,1,20,-1,1); > > TH2F h2("h2","test2",10,0,1,20,-1,1); > > TH2F h3("h3","test3",10,0,1,20,-1,1); > > TH2F h4("h4","test4",10,0,1,20,-1,1); > > > > c1.cd(1); > > gPad->SetBottomMargin(small); > > gPad->SetRightMargin(small); > > h1.Draw(); > > > > c1.cd(2); > > gPad->SetBottomMargin(small); > > gPad->SetRightMargin(small); > > gPad->SetLeftMargin(small); > > h2.Draw(); > > > > c1.cd(3); > > gPad->SetTopMargin(small); > > gPad->SetRightMargin(small); > > h3.Draw(); > > > > c1.cd(4); > > gPad->SetTopMargin(small); > > gPad->SetRightMargin(small); > > gPad->SetLeftMargin(small); > > h4.Draw(); > > } > > > >
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:00 MET