Hi,
In principle the fit function should be drawn in your case. It is maybe possible that the fit failed and the parameters do not make sense, so the function cannot be drawn on top of the existing points.
Lorenzo
On Feb 8, 2011, at 3:31 PM, HSing wrote:
> 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 Wed Feb 09 2011 - 08:50:22 CET
This archive was generated by hypermail 2.2.0 : Wed Feb 09 2011 - 11:50:01 CET