Problem in fitting (in function!)

Looking at your data, I guess you’d better try to use a TGraph2D, e.g.:

{
  TGraph2D *g = new TGraph2D("data.txt");
  g->SetTitle("some Thing;some X;some Y;some Z");
  g->Draw("surf3"); g->Draw("pcol same");
  gPad->Modified(); gPad->Update(); // make sure it's really (re)drawn
#if 0 /* 0 or 1 */
  g->GetXaxis()->SetLimits(50., 200.);
  g->GetYaxis()->SetLimits(80., 280.);
#else /* 0 or 1 */
  g->GetXaxis()->SetRangeUser(50., 200.);
  g->GetYaxis()->SetRangeUser(80., 280.);
#endif /* 0 or 1 */
  gPad->Modified(); gPad->Update(); // make sure it's really (re)drawn
}

@couet There is a bug in the drawing routines. One cannot use TAxis::SetLimits, if one wants “surf3” and “pcol” together. However, TAxis::SetRangeUser does work in this case.

Also, it may help if you use:
g->Fit(fit1, "R"); // use the Range specified in the function range