Splitting a canvas into (4x3), with a space between the first two rows


By using:
TCanvas *c1= new TCanvas(“c1”,title,65,50,1900,1500);

-I could get a 4x3 multiplot. But, now I want to put a space between the 1st row and the 2nd row (see the attached file).


ROOT Version: 5.34/36
Platform: Not Provided
Compiler: Not Provided

You may use https://root.cern/root/html534/TAttPad.html#TAttPad:SetBottomMargin

    TCanvas *c1= new TCanvas("c1","",65,50,1900,1500);
    for (int i = 1; i <= 4; i++)

    TH1D h("", "", 10, 0, 10);
    for (int i = 1; i <= 4 * 3; i++)
        c1->cd(i), h.DrawClone();

But this won’t give you uniform height.

Hi berserker,

Thanks for your reply. But, each panel has to be like a square. I guess only way out is to set TPads accordingly inside a canvas.

There is an example here:

Hi couet,

Thanks for your suggestion.

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