Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
Matt J
Posts:
4,988
Registered:
11/28/09
|
|
Re: Datacursormode for GUI with two Axes
Posted:
Dec 30, 2012 2:56 AM
|
|
"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.
|
|
|
|