Fitting a function on top of a color map

I have a 2D histogram which I plot as a color map, color is the quantity, horizontal axis is frequency and the vertical axis is the time. Now I see that in this color map, the quantity is changing position in a parabolic shape, so I like to fit a parabola on top of it, as a function of time and frequency.

I have done many fits with ROOT, but this is my first time trying to fit on a 2D histogram, basically not sure how to do it. Any hint, or example, is appreciated.

ROOT Version: 6.22/06
Platform: osx
Compiler: PyROOT


This example is what you are looking for.

1 Like

thank you and sorry for late reply, it actually took me some time to understand the example. In fact it seems that my application is very well covered in the next example after the one you suggested.

From a 2D histogram, I can then create a ProfileY, which as I understood, means for every X bin, the average of Y is calculated. This is then the trend that I was looking for and can be fitted. So your answer helped solve the problem.