Automatic rebinning, Fill with alphanumeric labels and TH2


while a set of statements like these:
TH1F test;

works nicely and a new bin with a label “testbin” is created, a similar set of statements for TH2F histograms does not work:

TH2F test2d;
does not work and a crash occurs. I acknowledge that the complexity of the two cases is different so I am just wondering if I have to consider it as a feature (it will never work) or as a bug which will be fixed. Presently I am using 5.18.00



Automatic binning with labels on a TH2 should work. Simply move to a more recent version.


Thanks Rene,

I have tried with 5.22.00 and it is almost ok. I have no crash and the filled histogram is quite ok but the first filled bin. If I try the following:

root [0] TH2F test2d
root [1] test2d.Fill(“testbinx”,“testbiny”,1)
root [2] test2d.Draw()
root [3] test2d.Draw(“text”)
root [4] test2d.Fill(“testbinx”,“testbiny2”,1)
root [5] test2d.Draw(“text”)

I got the attached plot. The number of entries in the first bin seems to be corrupted.



Instead of

TH2F test2d; do

TH2F test2d ("h","test",1,0,0,1,0,0);