Consider the attached file. When trying to fit the graph with a polynomial of degree 1 (with the range specified in the graph), the fit turns out to be quite erroneous. What could be the reason for that? The code is very similar to the code in the first example of the TGraphPainterClass. Besides, how would one fix the x-labels so that the decimals are only specified to two or three?
Where would one insert this? In the terminal? The value of p1 when applying the fit yields the desired slope, but it is very large and it would be nice to get the fit fitted onto the points.
Changing the divisions in the Editor to match the xmin and xmax values won’t change anything. Do the divisions need to be fixed in the macro beforehand?