I am able to extract a TH2 histogram from ROOT using the h = f[...].to_numpy()
of uproot.
This I can then plot with mplhep as a hist2dplot(h)
.
However, I have the problem that I would like to rebin the original histogram and then plot this. I could not find a working example of rebinning (that I can understand) with mplhep and I cannot find any such way to do it in uproot.
I tried doing this with rebinning/reshaping the arrays, but then I am again stuck at how to plot this exactly.
How do you do it? Is there an easy way? Any hints are welcomed :)