Rebinning to variable bin size

Hi ROOT experts,

It is possible this is a trivial question, but I am having a hard time rebinning histograms from a uniform to variable bin size. I have been looking at the Rebin and RebinAxis documentation, but am not sure if this can do what I want.

It looks like this question may have been asked before and left unanswered:

To be concrete, I have a histogram with 500 bins. Iā€™d like to merge the last 300 bins and perhaps merge bins 150-200 as well.

Thanks in advance,

1 Like

see documentation of TH1::Rebin at
see case 2


Hi Rene,

Yes, that is what I was looking for. Thanks for the quick reply!