Plotting a bilinear interpolation in TH2F

Good evening,

I currently have a discrete TH2F (like a grid with some points at the nodes) that I would like to interpolate (doing a bilinear interpolation between the points). I was about to hardcode something in c++ but I just happened to discover that ROOT provide that function :
[Double_t] TH2::Interpolate(Double_t x, Double_t y) const
Apparently that function interpolate a point with the 4 nearest points.

Now I would to plot the interpolated TH2F, in order to have a nice “linear” plot and not just some points at the grid nodes, would you have any idea of an easy and nice way to proceed ?

I was trying to interpolate a lot of of points and store them but that option take a lot of time and I hope there is a clever way.

Thanks.

HI @PPierre; I am sure @jonas can help you with this.

Cheers
J.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.