Label/title sizes with Divide(n,m,0)

Hi,
The attached script plots twice the same histogram in a canvas. Since the X-axis is the same and I need it plotted just once, I did a Divide(1,2,0). What annoys me is that the text has a different size in the two histograms (labels, stat box,…). How to keep them similar without having to tweak all the offsets and sizes?
Thanks
-Ber, using FC3/ROOT 5.08
canvtest.C (284 Bytes)

Specify the various fonts in pixels instead of per cent of pad size

[code]{
gStyle->SetLabelFont(63,“x”); //font in pixels
gStyle->SetLabelSize(14,“x”); //font size in pixels
gStyle->SetLabelFont(63,“y”);
gStyle->SetLabelSize(14,“y”);
gStyle->SetStatFont(63);
gStyle->SetStatFontSize(14);
hpx = TH1F( “hpx”, “”, 100, -4, 4 );

for (int i=0;i<25000;i++){
float px = gRandom.Gaus();
hpx.Fill(px);
}

hpx.SetYTitle(“Some Title For This Axis”);
c1 = TCanvas(“c1”,"",10,10,700,700);
c1.Divide(1,2,0.001,0.001);
c1.cd(1);
hpx.Draw();
c1.cd(2);
hpx.Draw();
}[/code]

For more details,see:
root.cern.ch/root/htmldoc//TAttText.html

Rene

Thanks Rene, but it doesn’t merge the bottom X-axis of the top plot with the top X-axis of the bottom plot (which is the intention here) when you put 0.001 instead of 0 in the Divide(1,2,0). Reintroducing the 0 with your gStyle settings, the label sizes are still different.

-Berrie

I forgot to set teh title font/size/offset. Add teh following lines:

gStyle->SetTitleFont(63,"y"); gStyle->SetTitleSize(14,"y"); gStyle->SetTitleOffset(1.9,"y");

see all options in TStyle

Rene