Plotting a graphic output of an external function in APPDESIGNER, more specifically the uiaxes

2 ビュー (過去 30 日間)
Jules Ray
Jules Ray 2020 年 4 月 22 日
回答済み: J. Alex Lee 2020 年 4 月 23 日
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?

回答 (1 件)

J. Alex Lee
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.

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by