Extract Fitting Data from Surface Plot

Dear Rooters,

Does anyone know how to extract data from a surface plot? i.e.

using the command TGraph2D *g = new TGraph2D(file.dat); g->Draw("surfl");
gives a surface fit to points in file.dat. Is it possible to extract the extrapolated data in-bewteen points?

Cheers

Dear tintin72,

The surface in TGraph2D is drawn after creating a 2D histogram with TGraphDelaunay.
You can either get the default histogram with TGraph2D::GetHistogram(), or create your own TGraphDelaunay object using the TGraphDelaunay(TGraph2D *) constructor and then call TGraphDelaunay::Interpolate(x,y) for all the points that you need.

G. Ganis

righto! I’ll give it a try.

thanks a lot.