Re: [ROOT] Divide pad problem

From: Maxim Nikulin (
Date: Tue Feb 24 2004 - 15:03:29 MET


Olivier and Rene, the zones.C macro produces a plot with collapsed and 
clipped labels. (ROOT-3.10/02, ROOT-4.00/02).

Are there any way to get equal label font sizes when a canvas contains a 
wide pad and a narrow one? I've attached the zones2.C macro to make the 
problem more clear.

Yours faithfully,
Maxim Nikulin

Olivier Couet wrote:
> Hi,
>  May be you can have a look at the tutorial macro zones.C. (I put it is 
> attachment)
>  Cheers,    Olivier
> On Thu, 19 Feb 2004, Michael Groys wrote:
>>I want to create plot with matrix of histograms.
>>Each one of them has the same x and y axis ranges.
>>So I want to plot axis labels once in the right side
>>and once in the bottom side of the matrix. In
>>addition I don't want margins between internal histograms.
>>So I'm doing something like:
>>f = new TF1("f", "x", 0, 1);
>>c = new TCanvas;
>>In this case I got in the canvas truncated '0' label.
>>in y axis. Moreover in the postscript file this
>>label will not appear at all.
>>So my question is:
>>How I can avoid this problem, or may be there is
>>another way of drawing such matrix of histograms?
>>Thanks in advance and best regards, Michael.
>>PS. I' using root version 3.10/02

   TCanvas c1("c2pad","c2pad",900,700);
   TH2F h2("h2", "h2", 10, 0, 1, 10, 0, 1);
   Int_t i;
   for(i = 0; i < 10000; ++i) {
      h2.Fill(gRandom->Exp(0.5), gRandom->Gaus(0.5, 0.2));
   h1 = h2.ProjectionX("h1");
   h1->SetNdivisions(505, "Y");
   TPad top_pad("top_pad", "top_pad",0,0.2, 1.0, 1.0);
   TPad bottom_pad("bottom_pad", "bottom_pad", 0, 0., 1.0, 0.2);

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET