# How to perform linear extrapolation on scatter plot?

I have five sets of data and I want to see the behavior as the data goes to 0. This is my code so far:

data = Import["myexcel"];
lp = ListPlot[{
data[[1, All, {1, 2}]],
data[[1, All, {1, 3}]],
data[[1, All, {1, 4}]],
data[[1, All, {1, 5}]],
data[[1, All, {1, 6}]]},
PlotStyle -> Opacity[0.6],
Joined -> {False},
PlotMarkers -> Automatic,
ImageSize -> 750]


I don't have a function for the data, so I can't find a tangent line.

How can I extrapolate each of the five data sets to zero?

• "I don't have a function for the data" - ...and we, on the other hand, do not have your data. In any event, please look at FindFit[] for finding the best-fit line, which you can then use for extrapolation (and the $y$-intercept will of course be the value at zero). – J. M.'s ennui May 7 '20 at 15:09
• If you want a linear function, I would recommend LinearModelFit as it also provides other statistics about the fit. This function works well for all kinds of linear models (not just linear in the sense of $y = m x + b$). If you do mean linear in the sense of $y = m x + b$, then you would write something like lm1 = LinearModelFit[data[[1, All, {1, 2}]], x, x]; Show[lp, Plot[lm1[x], {x, 0, 10}]] (replace 0 and 10 with whatever range suits you) to plot the fit to the first set of data. – MassDefect May 7 '20 at 18:20