TH2: Granularity?

Thanks for your support so far! Another issue:

I created a two-dimensional, two-bin histogram:

TH2F *h2 = new TH2F(“h2”, “bin problem”, 2, 0, 2, 2, 0, 2);

and issued

h2->Fill(1,1)

five times at the prompt. The points are scattered (randomly) in the upper half of the plot instead of being concentrated at (1,1)? Why is this? Changing nbinsx and nbinsy to something large like 10000 gets rid of the “granularity problem.”

When drawing a TH2 with the default option “scatter-plot” a number of dots corresponding to the number of entries in a cell i,j is randomly drawn within this cell.
In your case, it looks like you should use a TGraph instead of a TH2,
unless you really want to use a TH2 for statistics type data.

Rene