title: plotting straight line over a scatterplot
body: <pre><code>y = dsleep[&quot;TotalTimeInBed&quot;]
  x = dsleep[&quot;TotalMinutesAsleep&quot;] 
  plt.scatter(x,y,color = &quot;red&quot;)
  plt.plot([0,0],[961,961])
  plt.title(&quot;relation between total minutes asleep and total time in bed&quot;)
  plt.ylabel(&quot;total time in bed&quot;)
  plt.xlabel(&quot;total minutes asleep&quot;)
  </code></pre>
  <p>I tried this code but it ignored the line and output was simply a scatterplot. How should I plot a straight line of slope 45 degree over my scatter plot for comparing my data points</p>
  <p><img src="https://i.stack.imgur.com/bWBwF.png" alt="enter image description here" /></p>