Enable datacursor for certain axes
1 view (last 30 days)
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?
0 Comments
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')
See Also
Categories
Find more on Interactive Control and Callbacks 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!