TGraphErrors: NDF & Axis

Dear all,
I’m having problems with TGraphErrors class.
I’m using root 5.28 on a Mac OS X 10.6.7 machine.

Basically I have 2 problems:

[ul]

  1. I’m not able to get the axis name shown

  2. I do not understand why after fitting the graph the function
    still shows 0 as NDF (and the Chi2/NDF is indeed meaningless)

[/ul]

You can run the script in attachment in this way:

.L deltaNeff.C
deltaNeff(4e11)

Many thanks in advance!

Regards,
Marco Bomben
deltaNeff.C (3.15 KB)

Solved: the error arrays were having wrong dimensions. Sorry for the noise.

Nonetheless:

Thanks,
Marco

Hi,

Set the axis title on the f function only after the fit: Irr->Fit(f); f->GetYaxis()->SetTitle("|N_{eff}| [cm^{-3}]"); f->GetXaxis()->SetTitle("#phi [n_{eq}/cm^{-2}]");

Cheers,
Philippe.