How to load existing figure into GUIDE UIAxes
8 views (last 30 days)
Show older comments
I have an image with plots and labels layered on top that has been saved as both a .fig and a .jpg. My app loads the picture to display it, but the .jpg images are too blurry.
How do I load an existing .fig file into a UIAxes element? I already have the image saved as a property using openfig
4 Comments
Adam Danz
on 15 Apr 2021
Juan Pablo Pérez Durán's answer moved here as a comment
Did you find out how to? I'm struggling with the same thing:(
Adam Danz
on 15 Apr 2021
copyobj(ax.Children, app.UIAxes)
or completely replace the app axes with the axes from the external figure
newax = copyobj(ax, app.UIFigure);
and then reposition the copied axes, then delete the uiaxes
set(newax,'Units',app.UIAxes.Units,'Position',app.UIAxes.Position) % and possibily other properties
As Adam mentioned, this can get messy and my lines above are the untested bare minimum.
Answers (0)
See Also
Categories
Find more on Graphics Object Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!