Label title axis and SetOptStat

Dear all,
I divided the canvas in 2 pad and I have 2 TGraphError on each pad.
I should make bigger only the title of x and y axis for both but I can’t find a way to do it.
I also need to eliminate the Statistic of my fit function from the canvas but with

gStyle->SetOptStat(0)

I don’t the wanted result.

Can you help me?
thank you,

Svante


Please read tips for efficient and successful posting and posting code

ROOT Version: V6.12/06
Platform: Not Provided
Compiler: Not Provided


To set the axis title size on a given histogram do:

myhisto->GetXaxis()->SetLabelSize(0.03);
myhisto->GetXaxis()->SetLabelSize(0.03);

To set it globally use

gStyle->SetTitleSize(...)

See help

gStyle->SetOptFit(0);

If I use SetLabelSize(0.03) it change me the size of the numbers on the axis instead I need to keep it fixed and have bigger only the title of the axis

TGraphErrors *graph_res = new TGraphErrors(N,energy,residual,0,Err_residual);
    gStyle->SetOptStat(0);
        graph_res-> GetXaxis()-> SetLabelSize(0.07);
        graph_res-> GetYaxis()-> SetLabelSize(0.07);
        graph_res-> GetXaxis()-> SetTitle("energy[KeV]");
        graph_res-> GetYaxis()-> SetTitle("res[keV]");

This is what I’m doing and I need only to change energy and res.

oh sorry … TitleSize of course …

It works perfectly now, thank you.

Svante

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