we would like to fit a TH2D histogram with a 2-dimensional function. Unfortunately we were not able to figure out how to do this. Is this possible or do we have to use a TGraph2D instead? Is it possible to draw a TGraph2D like a TH2D histogram, i.e. without interpolation?
Verena, Jan Erik.
The answer your second question is:
TGraph2D fills a 2D histogram by Delaunay’s triangles interpolation. It is then possible to get the histogram (See TGraph2D help). When you Draw a TGraph2D with one of the histogram drawing options, this intermediate histogram is drawn. When you draw a TGraph2D with a specific TGraph2D option (like TRI or P) the TGraph2D is drawn directly (see help again)
see tutorials fit2.C and fit2a.C