Re: [ROOT] Fit

From: Robert Feuerbach (feuerbac@ernest.phys.cmu.edu)
Date: Sat Feb 03 2001 - 06:24:26 MET


Hi Dennis,

Generally, you'll use TF1::SetLineColor . For example:

  TF1 *myfunc = new TF1("myfunc","[0]*sin(x)/x",0,10);
  myfunc->SetLineColor(2);  // sets the color to red

Or, if you are doing a fit with a standard function:

  h->Fit("gaus");
  h->GetFunction("gaus")->SetLineColor(3);

Similarly, you have access to SetLineStyle, etc...

Good luck,
Rob
  

On Sat, 3 Feb 2001, Dennis C. Arogancia wrote:

> 
> Hi ROOTERS,
> 
>    In fitting, how to change the line color of the fitting function?
> The default color is always black.
> 
> 
> 
> Cheers,
> 
> Dennis
> 
> 
> 

-- 
/***************************************************
 * Robert Feuerbach   feuerbac@ernest.phys.cmu.edu *
 * CMU Physics Department           (412) 268-2772 *
 * Pittsburgh, PA 15213        FAX: (412) 681-0648 *
 ***************************************************/



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:35 MET