Not equal split canvas

How can I split q canvas in two subcanvas where the first is 80% of the total height and the second the 20% ?

Dear wiso,

You should create a TCanvas of the wanted size and then as many TPads of the relative sizes that you need.
For example, the following creates two pads in the height ratio (80,20):

root [0] TCanvas *c1 = new TCanvas("c1","Example 2 pads (20,80)",200,10,300,500)
root [1] TPad *pad1 = new TPad("pad1", "The pad 80% of the height",0.0,0.2,1.0,1.0,21)
root [2] TPad *pad2 = new TPad("pad2", "The pad 20% of the height",0.0,0.0,1.0,0.2,22)
root [3] pad1->Draw()
root [4] pad2->Draw()
root [5] 

You can find at root.cern.ch/root/html/tutorials … raw.C.html a more complex example using these features.

G. Ganis

it is the use of pad the only solution? I tried to plot 510 histograms with divide (9x57) and resize the canvas and window, but the size of the histograms become smaller and smaller (in height). I’m not sure how relate the number of histograms with the size of the canvas.

These are my last numbers:

allC = new TCanvas(“allC”,“All Plots”);
allC -> SetCanvasSize(1600, 10000);
allC -> SetWindowSize(1600, 800);
allC -> Divide(9,57);

It is the best if you want to have two drawing area in customized ratio.