I am drawing a graph with some lines using matplotlib, and I want to display the final value ynext to where each line ends on the right side as follows:

Any solutions or pointers to the relevant parts of the API? I am very puzzled.
I am using matplotlib 1.0.0 and the pyplot interface, for example. pyplot.plot(xs, ys, f, xs_, ys_, f_).
source
share