Th2Poly bins can have any shapes like ins this example. Bins may even be build of several distinct parts. Doing fitting in these conditions does not make sense. The honeycomb case is special because it is very regular and seems close to a normal TH2. But it is consider as any TH2Poly by ROOT and fitting does not apply.
I understand that for some cases, fitting would not make sense, however, the option to fit could have been kept available for the regular binning case like the honeycomb.
Thanks.
“kept” is not the right word as TH2Poly does not have fitting for the reasons I explained. It would be a special implementation for honeycomb. May be @moneta can comment on that.
The problem is that a TH2Poly has no builti-in concept of regular binning and one cannot check if the bins are all the same.
One could eventually perform a fit, by computing the integral of the function in the bin, but it is very complicated to implement and it will be very time consuming.
The simplest solution for you is to fill a TGraph2D (or TGraph2DErrors) with the bin center positions from the TH2Poly and you fit that object