Exchange between the 2D histogram Axeses


I have a 2D histogram, and
I need to exchange between it’s axes,
like if its is “A vs B”, I want it to be drawn as “B vs A”.
Any suggestions?

You should create a new histogram with the exchanged axis, loop on the original one, get the bins contents, and fill the new histogram accordingly. It would be simpler is you had an tree or an ntuple.

Hi couet,

Thanks for replay.
I already created a new histogram, and filled accordingly,
but I was almost sure that TH2 should have axis exchange drawing
option, because all needed information exist.