How to get specific axes handle in GUI with more then one axes?
조회 수: 1 (최근 30일)
이전 댓글 표시
Say I have GUI_1 with several axes. Now I start GUI_2 changes some settings and the corresponding axes in GUI_1 should change corresponding to the changes in GUI_2. Problem is I can't get the right axes-handle to refresh the correct axes.
findobj(HandleToGUI_1, 'type', 'axes')
gives me all axes and...
findobj(HandleToGUI_1, 'type', 'axes', '-and', 'Tag', 'TagForMySpecificAxes')
doesn't work...
How can I get the handle for my specific axes?
댓글 수: 3
Dennis
2018년 4월 20일
you can assign a handle when you create the axes
handles.axes1=axes('Position',[0.86 0 0.15 0.15])
채택된 답변
Jan
2018년 4월 20일
편집: Jan
2018년 4월 20일
If the figure was created by GUIDE:
handles_GUI1 = guidata(HandleToGUI_1); handles_GUI1.TagForMySpecificAxes % May be called specifically, perhaps 'axes_<TAG>'
You can store the wanted object manually by guidata also, when you do not use GUIDE. Using an already stored handle is faster than searching dynamically. If there is a huge number of elements in the GUI (hundreds), the delay is noticable.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!