# How to plot linear fits with a specific range from imported data?

So I imported multiple data points starting off from data1 to data11. I have them configured onto a graph, but I also have to find the line of best fit for each. I need to find the line of best fit for the data I have stored as [data2] with the range parameters of what I have below.

{290., 0.057}, {290.5, 0.055}, {291., 0.055}, {291.5, 0.056}, {292., \
0.056}, {292.5, 0.056}, {293., 0.054}, {293.5, 0.053}, {294., 0.054}, \
{294.5, 0.051}, {295., 0.053}, {295.5, 0.055}, {296., 0.057}, {296.5, \
0.054}, {297., 0.052}, {297.5, 0.055}, {298., 0.054}, {298.5, 0.055}, \
{299., 0.055}, {299.5, 0.051}, {300., 0.052}, {300.5, 0.055}, {301., \
0.052}, {301.5, 0.054}, {302., 0.054}, {302.5, 0.052}, {303., 0.053}, \
{303.5, 0.052}, {304., 0.053}, {304.5, 0.052}, {305., 0.054}, {305.5, \
0.053}, {306., 0.054}, {306.5, 0.053}, {307., 0.053}


So far, I've been able to find the line of best fit by:

line = Fit[data2, {1, x}, x]


however, I need to abide by the range parameters I provided above and plot that line of fit against the original plot.

I am a rookie, so thank you in advance.

• If this is not what you are looking for then please edit the question to include information such as data1, data11, data2 etc. clearly. i.stack.imgur.com/HTqMl.png
– Syed
Sep 24, 2021 at 17:38
• What are "range parameters" ?
– JimB
Sep 24, 2021 at 21:22
• The range of my data is from 260 to 400, and I only need line of best fit from the points x=290, to x=307 Sep 25, 2021 at 0:50
• Yes Syed I believe that's what I'm looking for, thank you. Is there a way I can upvote your help? Sep 25, 2021 at 0:52
• I am glad I could help. Please be more clear with your questions so as to get quicker and more useful replies. I was still unsure whether you had several sets of such data points spread over many ranges.
– Syed
Sep 25, 2021 at 6:28