Upper bin edge lost when rebinning histogram

I have a histogram
TH1F test(“histo”, “histo”, 3, 0.0, 3.0);

If I do
the last bin gets removed

I could at least remedy the situation by moving the upper edge of the last bin back to 3.0.
How to do it?

I guess Rebin saw there is a problem because I get:

root [2] test.Rebin(2);
Warning in <TH1F::Rebin>: ngroup=2 is not an exact divider of nbins=3.

Which is true … it is not easy to group 3 bins by pairs …

I think @moneta can give more details

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