Plotting a graphic output of an external function in APPDESIGNER, more specifically the uiaxes
조회 수: 2 (최근 30일)
이전 댓글 표시
Dear all:
I am trying to convert my old GUI's to apps and I got really complicated dealing with the graphics:
I have an external function, this function provides a graphic output, which can be ploted within axes.
e.g.
figure
plot_shaded_image(DEM)%where DEM is the input variable
I would like to put this output inside the UIAxes of an app
Complicated right? unless I edit the
plot_shaded_image
function, adding the axes information
for instance:
function ButtonPressFunction(app, event)
testgraph(app.UIAxes, . . .)
end
and in your external function,
function testgraph(h, . . .)
plot(h, . . .)
end
however, the original function is quite complicated, based in object oriented programming, so is almost imposible to edit..
I could solve this in GUIDE in a quite simple manner
axes(handles.axes1)%plot area in the GUI
complex_function(DEM)%DEM is any input
But how to do something similar in appdesigner?
seems to me that matworks did the appdesigner less flexible than GUIDE?
Any idea?
댓글 수: 0
답변 (1개)
J. Alex Lee
2020년 4월 23일
If there is no way to activate a uiaxes programmatically, you can try to create a regular axes in app designer in the startupfcn, which you might be able to activate as you did with call to axes. But I wouldn't recommend it for long term solution...if the old functions will have more lifetime in new gui scheme, I would do the tedious updates because anyway plotting should target axes when you have complicated guis.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!