Drawing lines by dragging the mouse in matlab
问题 I want to draw a set of disconnected lines on top of an image by dragging the mouse while pressing the left button. However, if I click on a previously drawn line to specify the starting point of the next line, the callback function is not being called and I don't get the point. Here is my code: function main_test S.fH = figure('menubar','none'); im = imread( 'image.jpg' ); S.aH = axes; S.iH = imshow( im ); hold on axis image; X = []; Y = []; set(S.aH,'ButtonDownFcn',@startDragFcn) set(S.iH,