필터 지우기
필터 지우기

How to save figures and subplots App Designer

조회 수: 21 (최근 30일)
Iacopo
Iacopo 2022년 5월 10일
댓글: Jon 2022년 5월 10일
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.

채택된 답변

Jon
Jon 2022년 5월 10일
편집: Jon 2022년 5월 10일
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
Jon
Jon 2022년 5월 10일
You can specify the full path to the file like this
% save the plot
exportgraphics(app.UIAxes,'c:\temp\myfig.jpg')
Jon
Jon 2022년 5월 10일
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

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Printing and Saving에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by