title: Show the final y-axis value of each line with matplotlib
body: <p>I'm drawing a graph with some lines using matplotlib and I want to display the final <code>y</code> value next to where each line ends on the right hand side like this:
  <img src="https://i.stack.imgur.com/6VECZ.png" alt="enter image description here"></p>
  
  <p>Any solutions or pointers to the relevant parts of the API? I'm quite stumped.</p>
  
  <p>I'm using matplotlib 1.0.0 and the pyplot interface, e.g. <code>pyplot.plot(xs, ys, f, xs_, ys_, f_)</code>.</p>