Re: [ROOT] Strange inconsistency in TH1::Fit()

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Aug 14 2000 - 22:52:56 MEST


Hi Ville,
You have a typo (O instead of 0). The statement should be:
 data->Fit("f", "0Q");

Rene Brun

On Mon, 14 Aug 2000, Ville Axel Bergholm wrote:

> 
> Hi,
> 
> for some reason the O option in TH1::Fit() doesn't seem to work.
> The following code shouldn't draw the histogram, but it does.
> Strangely, the source code (viewed through the class category
> documentation) seems to be OK?
> 
> 
> TF1 *theory = new TF1("theory", "expo(0)", 0, 1);    
> theory->SetParameters(1, -1);
> TH1D *data = new TH1D("data", "raw data", 20, 0, 1);    
> data->FillRandom("theory", 500);
> TF1 *f = new TF1("f", "pol3(0)", 0, 1);
> data->Fit("f", "OQ");  // the histogram gets drawn!
> 
> 
> Please send a reply also to my e-mail address.
> 
> 
> Ville
> 



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