title: Python: Pinpointing the Linear Part of a Slope
body: <p>I have several plots that look like the following:</p>
  <p><a href="https://i.stack.imgur.com/kTW5f.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kTW5f.png" alt="enter image description here" /></a></p>
  <p>I am wondering what kind of methods there might be for finding the slope between approximately 5.5 and 8 for the x-axis. Where there are several plots like this, I am more so wondering if there is a way to automatically find the slope value.</p>
  <p>Any suggestions?</p>
  <p>I am thinking <code>ployfit()</code>, or a linear regression. The problem is that I am unsure of how to find the values automatically.</p>