I'm trying to get the co-ordinates of the mouse cursor over an axis whilst the mouse is down. I have this so far:
set(axis_handle, 'buttondownfcn', @axisMouseDown);
function axisMouseDown(hObject, eventdata)
current_point = get(gca, 'currentpoint');
x = current_point(1);
y = current_point(1, 2);
This does get the correct co-ordinates of the cursor, but it also zooms the axis out, which is something that I'd like to avoid.
More specifically, as soon as the axisMouseDown() is fired, the axis zooms out to its default zoom level.
Thanks in advance for your help.