Here is a modification of some code a kind soul posted on the web. I
would like to collect data while the mouse is down.
What happens is that the program takes the data in only if the mouse
is right on the dot.
I think that is because the even handler that starts the program is
somehow attached to the dot, and not to the whole plot. What do I need
to do to be able to record mouse position as soon as the stylus is
down, regardless of the initial dot position on the screen?
f = figure;
aH = axes('Xlim', [0, 1], 'YLim', [0 1]);
h = plot(0.25, 0.25, '.', 'MarkerSize', 10, 'ButtonDownFcn',
% 'Marke2rEdgeColor' , 'k', ...
% 'MarkerFaceColor' , 'r', ...
% 'MarkerSize', 10, ...
% 'linewidth', 3, ...
% 'ButtonDownFcn', @startDragFcn);
set(f, 'WindowButtonMotionFcn', @draggingFcn)
pt = get(aH, 'CurrentPoint');
set(f, 'WindowButtonMotionFcn', '');