Re: [ROOT] How to display the fitted parameter of TH1?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Apr 13 2004 - 09:04:40 MEST


Hi Datao,

Datao Gong wrote:
> 
> Hi, ROOTers,
> It is very convenient to save histogram to a root files. When i fit a
> histogram , i hope to save the fitted parameters with histograms.
> histogram->Write() does not work. It save the histogram with statitisc
> box and the fitted curve, but there is no fitted parameter box.
> Actually if i set stytle wuth gStyle->SetOptFit(111), the fitted
> parameter box appear.

This is the expected behaviour. The fit parameter box appears only when
gStyle->SetOptFit has been called.

> 
> I also saved the TF1 object, but i do not know how to display the
> parameter box of TF1. tf1->Draw() only draw a curve.

Displaying the fitted parameters make sense only for the object (typycally
histogram) being fitted. If you want to display the information from a TF1,
create a TPaveText and add the information that you want.

Rene Brun

> 
> Anyone can help me about that?
> 
> Thanks
> 
> Datao



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET