Hi!
A question arose doing some modifications to the code.
The data I want to plot is 4x4. How does TGraph2D behave if I set a greater binning, perhaps 8x8 or 16x16?
It seems to me it smoothes the results, but I want to ask it to experts.
First of all TGraph2D deals with unbinned data. Like TGraph. But it is possible to project these unbinned data on a 2D histogram. The number of bins of this histogram is defined (along X and Y) with SetNpx and SetNpy.
I guess this is the answer to my question: a TGraph2D INTERPOLATES the z axis, therefore if your axis binning is higher than the actual content of the x,y,z array (i.e. > n), interpolation of z is called.
// TGraph2D linearly interpolate a Z value for any (X,Y) point given some
// existing (X,Y,Z) points. The existing (X,Y,Z) points can be randomly
// scattered. The algorithm works by joining the existing points to make
// Delaunay triangles in (X,Y). These are then used to define flat planes
// in (X,Y,Z) over which to interpolate. The interpolated surface thus takes
// the form of tessellating triangles at various angles. Output can take the
// form of a 2D histogram or a vector. The triangles found can be drawn in 3D