Re: [ROOT] log-scale and TH1::Fit

From: Thomas Bretz (tbretz@uni-sw.gwdg.de)
Date: Mon Oct 29 2001 - 16:22:15 MET


Hi Rene,

I'm using a variable bin size histogram like you showed in your example.
So I get the graphical output, as I like it. But if I try to fit this
histogram with a gaussian the 'raw' data is fitted. But I want to fit
the logarithmic data (3, 4, 5 not 1e3, 1e4, 1e5) The gaussian I get
after calling TH1::Fit doesn't even look like a gaussian (for sure) when
log scale is enabled.

I would like to have both advantages. The advatage of a nice display of
the x-axis and the advantage, that I can fit the logarithmic data
instead of the raw data.

Regards,
Thomas.


Rene Brun wrote:
> > I have a histogram which is filled with some data. The get a more
> > conviniet view of the x-axis I set the bins of the histogram so, that if
> > I call gPad->SetLogx() I get equidistant bins. Now I want to fit this
> > view with a gaussian, but TH1::Fit fits the original data instead of the
> > logarithmic data.
> >
> > Is it possible to get either the nice view of a log-scaled X-Axis if i
> > would use equidistant bins and fill the histogram with log(data) or is
> > it possible to tell the fitter, that it should fit the logarithmic data
> > instead of the 'real' data in the histogram?



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