Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Datacursormode for GUI with two Axes
Replies: 1   Last Post: Dec 30, 2012 2:56 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Matt J

Posts: 4,996
Registered: 11/28/09
Re: Datacursormode for GUI with two Axes
Posted: Dec 30, 2012 2:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Nima Nikvand" <nnikvand@uwaterloo.ca> wrote in message <kbom05$jsm$1@newscl01ah.mathworks.com>...
>
> dcmObj=datacursormode(handles.figure1);
>
> set(dcmObj,'Enable','on',...
> 'SnapToDataVertex','on', ...
> 'DisplayStyle','datatip',...
> 'UpdateFcn',@datatextbox);
> p = ancestor(dcmObj,'axes')
>
> however p is returning an empty matrix (p=[]). I'd greatly appreciate your suggestions.


You can't get the axis from the dcmObj. The dcmObj is a child of the figure, not any of the axes.

Call GCA inside datatextbox and return its output using nested functions, as I described in your other post.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.