I have a GUI with two axes, which are supposed to display two different plots, and I will be using datacursormode to get the information for the plots. I understand it is not possible to enable datacursormode for only one of the axes in my GUI, however, as suggested in previous questions, I was going to use ancestor function to figure out which one of the axes has been clicked on. Below is my general code:
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.