Hi,
I have two linearly correlated variables which I plot in a TH2F xy contour plot. I am then trying to fit this plot with a straight line, but the fit returns strange values for the line. If I define:
TF1* fit = new TF1(“fit”,"[0] + [1]*x",0.0,0.3);
and then try to fit:
hist->Fit(“fit”);
The line is quite off and does not show the correlation. Is there a better way to fit a straight line to a contour plot? Thank you for your help.
Cheers,
Peter