Hi Wen,
If you want to get more than one stats/fit box in a pad, use the technique I
reported in a previous mail today. Change the name of the "stats" box
to "stats1", etc.
Rene Brun
meiwen wrote:
>
> Dear Rooters,
> I have a histogram which should be fitted with different formulars
> in different ranges. I use the "R+" option to implement this function.
> But with gStyle->SetOptFit(1) I got only the parameters of the first
> formular in the statistic box. my code is following:
>
> myfunc1 = new TF1("myfunc1", "[0]+[1]*(950.-x)**2", 950, 1014);
> myfunc1->SetLineColor(6);
> myfunc1->SetLineWidth(1);
>
> myhisto->Fit("myfunc1", "R0");
> gStyle->SetOptFit(1);
> myfunc1->GetParameters(&par[0]);
> myfunc1->SetParameters(par);
> myfunc2 = new TF1("myfunc2", "gaus",1014 ,1030);
> myfunc2->SetLineColor(6);
> myfunc2->SetLineWidth(1);
>
> myhisto->Fit("myfunc2", "R0+");
> gStyle->SetOptFit(1);
>
> How can I get the rest parameters' values? Thanks for any help.
> Best Regards Wen Mei
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:33 MET