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!