How to store a selected axes-point in handles
이전 댓글 표시
Hello fellow Matlab-Users,
This is what i want:
- User selects a point in an axes_object.
- My program stores selected point in my figure's handles_object.
My first approach was to use the datacursormode's UpdateFcn to extract the data. I couldn't find a solution to the problem, that i can't reach the handles_object from the UpdateFcn.
My second approach was to write my own datacursormode. The new problem is, that i can't catch the ButtonDownFcn_trigger of my axes_object. Now im not sure if that is because the axes_object is located inside a panel inside a figure. Or because "Some Plotting Functions Reset the ButtonDownFcn" as i read in the axes_properties_docu.
Now i really search for some advice how to get that *** Coordinates.
Best regards, Peter
This is the most useful help i found so far:
채택된 답변
추가 답변 (1개)
Peter
2011년 9월 26일
댓글 수: 5
Jan
2011년 9월 26일
@Peter: In your case "obj" is the same variable as "hObject" in Walter's example. It is just another *name*. Can you see the similarities:
myUpdateFcn(hObject, event_obj)
myUpdateFcn(obj, event_obj)
Peter
2011년 9월 26일
Walter Roberson
2011년 9월 26일
handles = guidata(event_obj.Target);
Question: isn't datacursormode_Callback already the UpdateFcn ? Is there any reason to reset it to myUpdateFcn? Why not use it as-is and access the handles parameter that is already passed down?
Peter
2011년 9월 26일
Peter
2011년 9월 28일
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!