title: How to remove undesired lines from python plot?
body: <p>[Disclaimer: as a new-comer to the programming world, everything's here is new to me. Hope you understand, and thank you in advance for constructive criticism]</p>
  
  <p>I have a formatting problem with plotting some arrays on python. I have two arrays, and one error-bar array:</p>
  
  <pre><code>x1=n.log(Ar_P0/Ar_P1)
  y1=n.log(Ar_P0/H)
  y1_err=((Ar_P0/H)*n.sqrt((dP/Ar_P0)**2+(dH/H)**2))/y1
  </code></pre>
  
  <p>And I want to plot y1 as a function of x1, with the error-bars on y1:</p>
  
  <pre><code>plt.plot(x1,y1, '.k', label='transformed data points for Argon')
  plt.errorbar(x1,y1,yerr=y1_err, ecolor='k')
  plt.title('Evolution of the ln(P0/H) as a function of ln(P0/P1) for Argon')
  plt.xlabel('ln(P0/P1) for Argon')
  plt.ylabel('ln(P0/H) for Argon')
  
  plt.legend()
  
  </code></pre>
  
  <p>but the output goes like this: <a href="https://i.stack.imgur.com/IxknX.jpg" rel="nofollow noreferrer">(plot link)</a></p>
  
  <p>And I don't understand why are all my data points connected with blue lines; it screws up the formatting. It must be some type of garbage hanging somewhere but I don't understand how to remove it. </p>
  
  <p>As I'm a beginner, I hope you can make the explanation to this as simple as possible. I've seen some other posts related to this issue (and I'm not even sure if that's the case but I think so), but I don't understand the explanations provided. Thanks a lot.</p>