How do you display 3 histograms on the same canvas?

I’m using ROOT version 3.02/07.

I’m trying to display 3 equally sized histograms horizontally on the same canvas with no space in between the pads like this:

----------
----------
----------

I also need enough room on the bottom and left margins for labels.

I’ve been able to display 3 histograms but they’re not of equal size. The top histogram is the biggest, middle histogram is smaller and the bottom histogram is the smallest. I’m using this code to generate the canvas and display the 3 histograms:

{
gStyle->SetOptTitle(0);
TCanvas c1(“test”,“test”);
gStyle->SetPadBorderMode(0);
gStyle->SetOptStat(0);
gStyle->SetPadTickX(1);
gStyle->SetPadTickY(1);

TH1F *h1 = new TH1F(“h1”, “h1”, 100,0,4.4);
h1.FillRandom(“gaus”,10000);

TH1F *h2 = new TH1F(“h2”, “h2”, 100,0,4.4);
h2.FillRandom(“gaus”,10000);

TH1F *h3 = new TH1F(“h3”, “h3”, 100,0,4.4);
h3.FillRandom(“gaus”,10000);

c1.cd();
TPad top_pad(“top_pad”, “top_pad”,0.,.6,1.,1.);
top_pad.Draw();
top_pad.cd();
top_pad.SetBottomMargin(0);
h1->Draw();

c1.cd();
TPad middle_pad(“middle_pad”, “middle_pad”, 0.,.3, 1., .6);
middle_pad.Draw();
middle_pad.cd();
middle_pad->SetTopMargin(0);
middle_pad->SetBottomMargin(0);
h2->Draw();

c1.cd();
TPad bottom_pad(“bottom_pad”, “bottom_pad”, 0., 0., 1., .3);
bottom_pad.Draw();
bottom_pad.cd();
bottom_pad->SetTopMargin(0);
h3->Draw();
}

I’m brand new to ROOT (been using it for a week) and I’ve looked all over for a solution but can’t find anything. This graphic has to be publish quality and I’m experimenting with ROOT to see if it is able to might my needs. Any help will be appreciated.

Thank you,
Ryan Blinstrup

see tutorial zones.C

Rene