matplotlib/matplotlib — pull request #1865 by rephorm (2013-03-28 03:38:27+00:00)
Title: Fix manual contour label positions on sparse contours

Prior to this, contour labels were positioned at the nearest contour
vertex, which in some cases (e.g., straight contours) could be quite
distant from the desired location (and occasionally not even on the
correct contour).

This centers the label on the closest point on contour itself (using
linear interpolation between vertices).

Old:
![contour_test old](https://f.cloud.github.com/assets/70022/311812/bd176f24-9758-11e2-9545-d5cf4377a077.png)

New:
![contour_test patched](https://f.cloud.github.com/assets/70022/311813/c24c5004-9758-11e2-826e-dcb7ca89a858.png)