title: How to label a line in matplotlib (python)?
body: <p>I followed the documentation but still failed to label a line.</p>
  
  <pre><code>plt.plot([min(np.array(positions)[:,0]), max(np.array(positions)[:,0])], [0,0], color='k', label='East') # West-East
  plt.plot([0,0], [min(np.array(positions)[:,1]), max(np.array(positions)[:,1])], color='k', label='North') # South-North
  </code></pre>
  
  <p>In the code snippet above, I am trying to plot out the North direction and the East direction.</p>
  
  <p><code>position</code> contains the points to be plotted.</p>
  
  <p><strong>But I end up with 2 straight lines with NO labels</strong> as follows:
  <img src="https://i.stack.imgur.com/4vjTT.png" alt="enter image description here"></p>
  
  <p>Where went wrong?</p>