Choose the binning of a TH2F

Hello ROOTers,

I’m trying to choose the best binning for the next TH2F:

My goal is to get a good view of every diagonal slit:

I’m using the command:


without getting any great results. Is there a method to individually choose the bin of P1 and E1 and then plot P1:E1 without ROOT losing information about the chosen binning?

The data are contained in a .root file

Thank you very much.

tree->Draw("P1:E1"); produces an unbinned 2-d scatter-plot (a TGraph).

So…how can I separate better every slit?

That’s your data, not ROOT.

You can try to “zoom” it, e.g.: tree->Draw("P1:E1", "E1 > 500. && E1 < 1000.");

So…no way, ok thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.