ROOT: TH1 undrawn last bin

Stephen Bailey (bailey@physics.harvard.edu)
Mon, 26 Jul 1999 14:43:31 -0400 (EDT)


Hi ROOTers.

The following script demonstrates an odd little problem.
For the histogram h1, the last bin should be for values between
0.99 and 1.0. It is apparently getting filled but it isn't drawn.
It works for h2 which has a slightly different lower bound but
the same upper bound.

I'm using ROOT 2.22/06 compiled with KAI KCC on Linux.

Any ideas what's wrong? Thanks

Stephen

{
TH1F h1("h1", "", 100, 0.0, 1.0);
TH1F h2("h2", "", 100, 0.001, 1.0);

double little = 0.5;
double big = 0.9;
double bigger = 0.995;

for(int i = 0; i < 100; i++) {
h1.Fill(little); h1.Fill(big); h1.Fill(bigger);
h2.Fill(little); h2.Fill(big); h2.Fill(bigger);
}

TCanvas c1("c1", "Histogram Testing");
c1.Divide(1, 2);
c1_1->cd(); h1.Draw();
c1_2->cd(); h2.Draw();

}