I have some data. When I plot these data, the graph looks very linear when $x>x_0$ (In the following figure $x_0$ is shown by dashed lines). One way to determine the exact location where the graph is linear is to use eyeball, but that is very subjective and does not see scientific.
The question are (1) what is the criterion for determining $x_0$? (2) how can we implement the criterion using say MATLAB or Python?
