Enable datacursor for certain axes
Show older comments
I have a gui with two sets of axes. One of the axes displays an image and has an associated ButtonDownFcn to track clicks. The other axis has a plot, which I want to be able to use the datacursor on. Is there an easier solution than using window callbacks to change datacursor behavior depending on the mouse position? Anybody?
Answers (2)
Tom
on 26 Jul 2012
The datatip won't show up if you hide the axes handle,e.g.
AX(1)=subplot(2,1,1);
plot(rand(10,1))
AX(2)=subplot(2,1,2);
plot(rand(10,1))
datacursormode on
set(AX(2),'HandleVisibility','Off')
Walter Roberson
on 26 Jul 2012
0 votes
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!