Re: [ROOT] Plot the fit result

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Sep 21 2000 - 09:01:41 MEST


Hi Dimitris,
It is not clear what you request. Do you want to suppress the drawing of
the fitted function or the drawing of the fit parameters in the "stats"
box?
Assuming a TH1 *h and a call like
   h->Fit("myfunc")
when you do later h->Draw(), the function is drawn by default.
If you do h->Draw("hist") only the histogram is drawn.

If you want to activate the drawing of the fit parameters in the "stats"
box, you can do
  gStyle->SetOptFit()
These parameters are not drawn by default.
In case this option is already activated, you can disable it via
   gStyle->setOptFit(kFALSE);

Rene Brun

On Wed, 20 Sep 2000, Dr. D. Sideris wrote:

> Dear Rooters, I have the following problem:
> 
> I want to fit a function to a histogram. Then I want to read the fit parameters, but I don't want to plot the fit result when I draw the histogram. I can't find a simple way to do that. I have tried the O and N options in the histo->Fit() function but, either the line is drawn or I lose the fit parameters.
> Probably I'm missing something obvious.
> 
> Regards
> Dimitris Sideris
> 



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:33 MET