title: Adding an arbitrary line to a matplotlib plot in ipython notebook
body: <p>I'm rather new to both python/matplotlib and using it through the ipython notebook. I'm trying to add some annotation lines to an existing graph and I can't figure out how to render the lines on a graph. So, for example, if I plot the following:</p>
  
  <pre><code>import numpy as np
  np.random.seed(5)
  x = arange(1, 101)
  y = 20 + 3 * x + np.random.normal(0, 60, 100)
  p =  plot(x, y, "o")
  </code></pre>
  
  <p>I get the following graph:</p>
  
  <p><img src="https://i.stack.imgur.com/wd79r.png" alt="beautiful scatter plot"></p>
  
  <p>So how would I add a vertical line from (70,100) up to (70,250)? What about a diagonal line from (70,100) to (90,200)?</p>
  
  <p>I've tried a few things with <code>Line2D()</code> resulting in nothing but confusion on my part. In <code>R</code> I would simply use the segments() function which would add line segments. Is there an equivalent in <code>matplotlib</code>?</p>