Hi Martin,
By default TH1::Fit also draws the histogram.
You can specify teh drawing options to TH1::Fit, eg
instead of
h1->Fit("gaus");
h1->Draw("ep");
do:
h1->Fit("gaus","","ep");
Rene Brun
Martin Weber wrote:
>
> Dear all,
>
> why is the order of fitting / drawing important in the example below? I
> would expect the graphical output to be equivalent!
>
> Martin
>
> isbugorfeature()
> {
> TCanvas * c1 = new TCanvas("c1", "c1", 600, 800);
> c1->Divide(1,2);
> TH1F * h1 = new TH1F("h1", "h1", 100, -3, 3);
> h1->FillRandom("gaus");
>
> c1->cd(1);
> h1->Fit("gaus");
> h1->Draw("ep");
>
> c1->cd(2);
> h1->Draw("ep");
> h1->Fit("gaus");
> }
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET