TH1::Sumw2() and Draw option "hist" ignored

Hello.

I am having problems plotting a scaled histogram (including a fit) without error bars.
Reading through the Root Talk posts, the draw option “hist” should be used.
So:

histo->Sumw2();
histo->Scale(x);
histo->Draw("hist");
histo->Fit("gaus");

should do the job. It however doesn’t seem to work.
A minimal example is attached, it would be great if somebody could have a look.

Maurits
test.cxx (337 Bytes)

int test() {
  TH1D *histo = new TH1D("histo","Random Gauss",1000,-4,4);
  for (int i=0; i<10000; i++)
    histo->Fill(gRandom->Gaus(0,1));
  histo->Sumw2();
  histo->Scale(1.e-5);
  histo->Rebin(4);
  histo->SetFillStyle(3004);
  histo->SetFillColor(4);
  histo->Fit("gaus","Q");     
  histo->Draw("hist");
  TF1 *g=histo->GetListOfFunctions()->FindObject("gaus");
  g->Draw("same");  
}

Thank you, that does the job.
The culprit seems to be

which seems to reset any Draw(“hist”) option. Peculiar…

Cheers,

Maurits