TH1 draw options disabled at large or small weight

Hello,
I am currently using ROOT 6.06 I am noticing that if I fill a TH1 with very small weight say, 0.01, The Draw options no longer work properly. Instead of just Draw(“1D option”) Histogram being plotted properly, I get horizontal lines at the bin content vertically.

This also seems to happen for very large weight, say filing up to 10,000, I get the same issue.

Am I doing something wrong, or is this a bug that’s resolved in later version of the ROOT?

Thank you.

interesting … can you post a small script reproducing this ?

Here is a sample Macro.

Control draws properly, neither h or i draws properly. The Fill option and Fill Color gets ignored.

[code]{ TCanvas *Can=new TCanvas(“C”,“CC”,1400,900);

TH1F *control=new TH1F(“ch”,“chh”,11,0,10);
TH1F *h=new TH1F(“h”,“hh”,11,0,10);
TH1F *i=new TH1F(“i”,“i”,11,0,10);

for(int j=0; j<10000;j++){
control->Fill(j);
h->Fill(j %10, 10000);
i->Fill(j %10,0.00001);
}
control->SetFillStyle(3002);
control->SetFillColor(kBlue);
h->SetFillStyle(3002);
h->SetFillColor(kBlue);
i->SetFillStyle(3002);
i->SetFillColor(kBlue);
Can->Divide(3);
Can->cd(1);
h->Draw();
Can->cd(2);
i->Draw();
Can->cd(3);
control->Draw();}[/code]

After speaking with a colleague, I realized that the default option
Draw(""); needs to have an option that dedicated to histogram.
Changing Draw() to Draw(“HIST”); solved the problems. This is a bit unexpected because It ignored “L”,“E” and a few other options.

You can also do this:

{
   TCanvas *Can=new TCanvas("C","C",1400,900);

   TH1F *control = new TH1F("ch","ch",11,0,10);
   TH1F *h       = new TH1F("h","h",11,0,10);
   TH1F *i       = new TH1F("i","i",11,0,10);

   for (int j=0; j<10000;j++) {
      control->Fill(j);
      h->Fill(j %10, 10000);
      i->Fill(j %10,0.00001);
   }

   h->Sumw2(kFALSE);
   i->Sumw2(kFALSE);

   control->SetFillStyle(3002);
   control->SetFillColor(kBlue);
   h->SetFillStyle(3002);
   h->SetFillColor(kBlue);
   i->SetFillStyle(3002);
   i->SetFillColor(kBlue);

   Can->Divide(3);
   Can->cd(1); h->Draw();
   Can->cd(2); i->Draw();
   Can->cd(3); control->Draw();
}