Great function. Is there any way to use it to get the position when the mouse left button is clicked over the image? as in ginput function, to capture several cursor positions. thanks
Eduardo, for a simple hack you could replace 'WindowButtonMotionFcn' in the above example with 'WindowButtonDownFcn' and it will respond to button clicks (both left and right) but only when not in zoom/pan mode.