Hi Fabrice, You cannot fit a 2d histogram with a 1d function. You have 2 alternatives to do what you would like : fit (x,y) data points with a y(x) function : - Fill a TProfile with your points and fit it (see http://root.cern.ch/root/html/TProfile.html) - Fill a TGraph and fit it. (see the macro http://root.cern.ch/root/html/examples/graph.C.html) cheers, Colin Fabrice Podlyski wrote: > Hello, > > I try to do a linear fit (ax+b) in a 2d histogram. > In fact, i just want "regression line". > I have searched in the Tutorial examples, but i 've > found more complicated examples ! > (I try to update the myfit2.C program to my case by replacing > the fitf function but without success !) > > Is it possible to do that ? > > Thank you in advance for your help, > > regards > > FP -- ------------------------------------------------------------- Colin Bernet Tel. +49-6131/39-23192 Fax +49-6131/39-22964
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:36 MET