TH2D with random entry


I’m filling 2D histogram (using Fill()) and getting very strange output, which is attached. This is when I just called Draw(). If I do Draw(“box”), I get much more sensible distribution (only around 1). When I do scatter plot from TTree::Draw, it is drawn correctly by default… Could you tell me how I can fix this default random drawing of 2d histogram?

Thanks for your help in advance


When you draw a TH2 without any option, a pseudo-scatter plot is drawn. In each bin some random points are drawn. The number of points is propotional to the bin content. In your case all the bins contain similar values (as you said close to 1), so you get this uniform grayish plot. Use option BOX or COL etc …