title: Adding a line to a matplotlib scatterplot based on a slope
body: <p>I have a scatter plot built from a DataFrame - it shows a correlation of two variables - Length and Age</p>
  
  <pre><code>import matplotlib.pyplot as plt
  df = DataFrame (......)
  plt.title ('Fish Length vs Age')
  plt.xlabel('Length')
  plt.ylabel('Age (days)')
  plt.scatter(df['length'],df['age'])
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/2ScJc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2ScJc.png" alt="enter image description here"></a></p>
  
  <p>Now i want to add a line with a given slope of <strong>0.88</strong> to this scatter plot. How do i do this?</p>
  
  <p>P.S. All examples i managed to find use points and not slopes to draw the line</p>
  
  <p><strong>UPDATE</strong>. I re-read the theory - and it turned out that the fact that the correlation coefficient should be plotted against the data points was made up by me :) Partially because of this image in my head <a href="https://i.stack.imgur.com/iuMfD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iuMfD.png" alt="enter image description here"></a></p>
  
  <p>However i still am confused by the line - plotting capabilities of matplotlib </p>