Hi Lorenzo,
Thank you. I tried to change x points as:
void MyTest()
{
double x[4] = {328, 329, 330, 331};
double y[4] = {813.128, 690.941, 592.383, 413.539};
TGraph *gr = new TGraph(4, x, y);
gr->Draw("AP*");
gr->Fit("pol3");
}
And it looks wee now.
Then if I change x points by 100 more like:
void MyTest()
{
double x[4] = {428, 429, 430, 431};
double y[4] = {813.128, 690.941, 592.383, 413.539};
TGraph *gr = new TGraph(4, x, y);
gr->Draw("AP*");
gr->Fit("pol3");
}
Then it gives me errors:
It’s strange. If I use MS-Excel or LibreOffice, I can easily get a correct results:
So how should I set ROOT to fit “pol3” to 4 points always correctly?
Thank you,
Kailong