how to improve quality of exportapp?

조회 수: 21 (최근 30일)
Mostafa
Mostafa 2023년 7월 31일
댓글: Mostafa 2023년 8월 7일
Hi
Just wondering if anybody know how to improve quality when I use exportapp(fig,plot_file).
for example by using exportgraphics(fig,plot_file_2,'Resolution',300) the resolution is 300 but it is not work with exportapp function probably come in future!!!
Thanks for help in advance
Mostafa

답변 (1개)

Mrutyunjaya Hiremath
Mrutyunjaya Hiremath 2023년 7월 31일
MATLAB's App Designer does not provide a built-in option to directly control the resolution of the exported image. This is because the 'exportapp' function is designed to export the entire app as an image, including the user interface components, which may have varying sizes and complexities. Therefore, it doesn't directly map to a single resolution value like 'exportgraphics' does for individual figures.
However, there are some strategies you can try to improve the quality of the exported image:
  • Adjust Figure Size: Before exporting the figure using 'exportapp', you can try adjusting the size of the figure to a larger dimension. This will effectively increase the resolution of the exported image. For example:
fig = uifigure;
% Create and plot your UI components here...
% Adjust the figure size before exporting:
fig.Position = [100, 100, 800, 600]; % Set a larger width and height
exportapp(fig, 'plot_file.png');
  댓글 수: 1
Mostafa
Mostafa 2023년 8월 7일
Thanks for your answer
The problem is that the changing of position is also change the whole app and it is not like this that all elements in the app become larger. It is just the size of main window become bigger and justify everything by changing their location.
However, I notice by using pdf format the export result become vector graphics and prep your app element for high-resolution but not the plot.
Mostafa

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

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by