Plotting a graphic output of an external function in APPDESIGNER, more specifically the uiaxes
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
J. Alex Lee
on 23 Apr 2020
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 Comments
See Also
Categories
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!