How to show histogram fit without histgram error bars

Hi,

I want to be able to show a histogram without its error and a fit to that histogram (even if it uses those errors in doing the fit).

Thanks,
Charles

[code]root [0] TH1::SetDefaultSumw2()
root [1] TH1F hist (“hist”,“hist”,10,0.5,10.5)
root [2] hist.Fill (3,3)
root [3] hist.Fill (4,5)
root [4] hist.Fill (5,8)
root [5] hist.Fill (6,4)
root [6] hist.Fill (7,2)

shows histogram with no error bars

root [8] hist.Draw(“hist”)

fits and shows histogram with error bars

root [9] hist.Fit(“gaus”)

fits and shows histogram with no error bars

root [11] hist.Fit(“gaus”,"",“hist”)

shows fit and histogram with errors

root [12] hist.Draw(“fit same”)
[/code]

And for those of you who haven’t yet mastered Emacs rectangle functions but want to cut and paste the whole example at once:

TH1::SetDefaultSumw2()
TH1F hist ("hist","hist",10,0.5,10.5)
hist.Fill (3,3)
hist.Fill (4,5)
hist.Fill (5,8)
hist.Fill (6,4)
hist.Fill (7,2)
hist.Draw("hist")
hist.Fit("gaus")
hist.Fit("gaus","","hist")
{
TH1::SetDefaultSumw2();
TH1F *hist = new TH1F("hist","hist",10,0.5,10.5);
hist->Fill (3,3);
hist->Fill (4,5);
hist->Fill (5,8);
hist->Fill (6,4);
hist->Fill (7,2);
hist->Fit("gaus"," ","hist");
hist->GetListOfFunctions()->FindObject("gaus")->Draw("same");
}

That does exactly what I want. Thanks!