Plot multiple varaible-sized-bins histograms with offset

Dear experts,

I am trying to plot multiple histograms with same binning with a slight offset wrt each other in order to avoid overlapping error bars.

I have found a nice solution in https://root.cern.ch/root/roottalk/roottalk03/2765.html, but apparently it seems to work only for standard histograms with all-same-size bins.

In my case, I have histograms with variable bin size. The minimal stand-alone macro in attachment shows the issue.

Is it an expected behaviour? If yes, do you have any elegant solution to this problem?
So far, the only way I could find is to make new histograms with variable size bins (with the offset), and then manually copy the original histogram bin content and error via SetBinContent(), SetBinError()

Many thanks in advance.

Cheers

Marco
testshift.cxx (1.47 KB)

[url=https://root-forum.cern.ch/t/can-we-shift-histogram-for-several-channels/12050/2 we shift histogram for several channels?[/url]