Is it possible to smooth a TH2D object using CubicSpline? An example about what I am looking for is attached.
see the contour options
Indeed, graphically, cont4z does the job. However, I need to have access to the values of the fitted histogram (kind of fittedHisto->Eval(x,y)).
CONToptions are purely graphics and do not change the histogram. So there is nothing you can get from the histogram reflecting the smoothed plot you see. May be use Smooth and get the bin content afterwards ?
Sorry for this late reply, I was trying something else. As I could not figured out how to use Smooth in this specific problem (it does not do the job), I will try to use python.
may be @moneta has an idea ?
We don’t have cubic interpolation or splines for the 2D case. We have only linear interpolation, see
Otherwise we have also Delauney triangular interpolation, which works also for 2D points not situated in a grid. The function is available in the TGraph2D class, see
If needed we could add the cubic interpolation in one of the next ROOT release. If you want to contribute and provide us a pull request, we would be grateful
Thanks for the explanation. I am doing some tests about it and if something useful comes out, I will let you know.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.