title: matplotlib -- interactively select points or locations?
body: <p>In R, there is a function <code>locator</code> which is like Matlab's <code>ginput</code> where you can click on the figure with a mouse and select any x,y coordinate. In addition, there is a function called <code>identify(x,y)</code> where if you give it a set of points x,y that you have plotted and then click on the figure, it will return the  index of the x,y point which lies nearest (within an adjustable tolerance) to the location you have selected (or multiple indices, if multiple points are selected). Is there such a functionality in Matplotlib?</p>