Re: [ROOT] TgraphErrors fits

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Jun 18 2002 - 23:29:32 MEST


Hello Art,

You can use TObject::DrawClone (true for any object)
example: execute $ROOTSYS/tutorials/gerrors2.C, then

   gr2->Fit("pol4");
   c1->Clear();
   TGraphErrors *gr2c = (TGraphErrors*)gr2->DrawClone("alp");
   gr2->Fit("pol3");
   gr2->Draw("lp");

Rene Brun

On Tue, 18 Jun 2002, Art Poskanzer wrote:

> On one plot I have four TGraphErrors objects to which I want to fit 
> a complicated user defined TF1 function. When I change the 
> parameters for the second fit and plot the graph I find that the 
> first fit has changed. TGraphErrors does not have a DrawCopy method 
> with which I could freeze the first fit. I don't want to instantiate 
> four different versions of the fitting function and its macros. I 
> don't know how to define a separate param array for each fit. Is 
> there a simple way to solve this problem?
> 
> I am using ROOT 3.02.07. Since I no longer subscribe to roottalk, 
> please send a copy of your answer directly to me. Thanks.
> 
> Art Poskanzer
> 



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:57 MET