How to load existing figure into GUIDE UIAxes

11 次查看(过去 30 天)
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 个评论
Adam Danz
Adam Danz 2021-4-15
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
Adam Danz 2021-4-15
As Adam mentioned above, you'll either need to copy all of the axis elements to the uiaxes
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Object Programming 的更多信息

标签

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by