I'm creating a set of axes in a figure and assigning a callback for its 'ButtonDownFcn'
property like so:
HRaxes = axes('Parent', Figure, 'Position', [.05 .60 .9 .35],...
'XLimMode', 'manual', 'ButtonDownFcn', @HR_ButtonDown);
Where the callback function is defined as such:
function HR_ButtonDown(hObject, eventData)
%# Do some stuff here when the axes is clicked on...
end
The callback works fine until I plot something on the axes like so:
plot(HRaxes, data.HR_X, data.HR_Y, 'b');
After which the callback doesn't trigger anymore when I click on the axes. What's going wrong and how can I fix it?