Effacer les filtres
Effacer les filtres

How to save figures and subplots App Designer

21 vues (au cours des 30 derniers jours)
Iacopo
Iacopo le 10 Mai 2022
Commenté : Jon le 10 Mai 2022
Hello,
Does anyone know how to save app elements within App Designer? I have some subplots (app.axis(i)) to save. The fuction saveas, that I write as following;
saveas(app.axis(i),'filename','jpg');
Returns this:
Error using print
Functionality not supported with figures created with the uifigure function.
Am I writing it wrong? I've tried annotation, exportgraphics, but they all return similar errors.

Réponse acceptée

Jon
Jon le 10 Mai 2022
Modifié(e) : Jon le 10 Mai 2022
This is a way of making a screen shot of the figure within app designer
plot(app.UIAxes,1:100,rand(1,100))
% save the plot
exportgraphics(app.UIAxes,'myfig.jpg')
  3 commentaires
Jon
Jon le 10 Mai 2022
You can specify the full path to the file like this
% save the plot
exportgraphics(app.UIAxes,'c:\temp\myfig.jpg')
Jon
Jon le 10 Mai 2022
I have to say, it seems really strange that they wouldn't support saveas for uifigures.
I also see there are some other more elaborate approaches to work around this, for example with this answer

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Printing and Saving dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by