title: Plotting lines connecting points
body: <p>I know there is another very similar question, but I could not extract the information I need from it.</p>
  
  <p><a href="https://stackoverflow.com/questions/17698824/plotting-lines-in-pairs">plotting lines in pairs</a></p>
  
  <p>I have 4 points in the <code>(x,y)</code> plane: <code>x=[x1,x2,x3,x4]</code> and <code>y=[y1,y2,y3,y4]</code></p>
  
  <pre><code>x=[-1 ,0.5 ,1,-0.5]
  y=[ 0.5,  1, -0.5, -1]
  </code></pre>
  
  <p>Now, I can plot the four points by doing:</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  plt.plot(x,y, 'ro')
  plt.axis('equal')
  plt.show()
  </code></pre>
  
  <p>But, apart from the four points, I would like to have 2 lines:</p>
  
  <p>1) one connecting <code>(x1,y1)</code> with <code>(x2,y2)</code> and 
  2) the second one connecting <code>(x3,y3)</code> with <code>(x4,y4)</code>.</p>
  
  <p>This is a simple toy example. In the real case I have 2N points in the plane.</p>
  
  <p>How can I get the desired output: for points with two connecting lines ?</p>
  
  <p>Thank you.</p>