Why does the ButtonDownFcn callback of my axes object stop working after plotting something?
- 阅读更多 关于 Why does the ButtonDownFcn callback of my axes object stop working after plotting something?
问题 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