I am trying to superimpose a TGraph2D with the result of its fit, a TF2. In the example attached, I fit a simple plane z(x,y)=x The result of the fit is right, but when plotted together the graph points do not appear at the right position. It is even more obvious if you change the range of the TF2.
It looks like the graph2dfit.C tutorial suffers from the same problem.
How can I proceed to view the points and the fit simultaneously ?
This option SAME with 3D plots in the pad works only when the 2 plots have exactly the same ranges. I modified your macro to make sure that the fit result and the graph points have the same range. I will also have a look the graph2dfit.C example.