Home | News | Documentation | Download

Weird problem with TH2F

Please read tips for efficient and successful posting and posting code

_ROOT Version:Latest as of January 2021
Platform: Ubuntu

Compiler: C++

So I want to plot a couple hundred points on a 2d histogram, but when I draw the histogram, it shows me this: (See Image).

This is how I declare my TH2F:

TH2F *sideExit = new TH2F("Side", "Muons that exit from the side", 100, -2*detectorRadius, 2*detectorRadius, 100, -2*detectorRadius, 2*detectorRadius);

And to draw:


what is the problem?

It is not a problem. You misunderstood the SCAT option (default) for TH2:

Oh yes. Thanks it works now

1 Like