TGraph Fit

From: HSing <harinder.singh.bawa_at_gmail.com>
Date: Tue, 8 Feb 2011 15:31:52 +0100


Dear Experts,

I am trying to superimpose graphs .

TGraphAsymmErrors *gr2
gr2->Draw(AE2)

TGraphAsymmErrors *gr3
gr3->Draw("PSAME")

TGraphAsymmErrors *gr4
gr4->Draw("PSAME")

Upto here its fine. But when I tried to fit gr4 with fcn say "pol4" as

TGraphAsymmErrors *gr4 = new TGraphAsymmErrors( n, mborder, Composite4000_value, 0,0, 0,0);

   gr4->Fit("pol4");
   gr4->Draw("AP*");
   TF1 *fit = gr4->GetFunction("pol4");
   fit->SetLineColor(kBlue);
   fit->SetLineStyle(1);

I am not getting Fit line, only getting points of the graph. How to plot the FIT ? Thanks Received on Tue Feb 08 2011 - 15:32:08 CET

This archive was generated by hypermail 2.2.0 : Wed Feb 09 2011 - 11:50:01 CET