Variable binwidth in 2D histograms


I have tried both :
[TH2F histogram rebinning with different bin sizes

support to plot a 2D histograms with the variable bin width.

However, it doesn’t seem to work on ROOT version 5.26 nor 5.34.

p.s (in the 2nd link there is a typo in the answer code, where ; should be used instead of , in the loop)

Many thanks


Can you post a small example showing what does not work ?

PS: Typo fixed.