필터 지우기
필터 지우기

Highest-quality printed graphics with exportgraphics

조회 수: 8 (최근 30일)
Sim
Sim 2023년 6월 2일
댓글: Sim 2023년 6월 5일
Typical commands for exportgraphics are the following:
exportgraphics(fig, 'output.tif') % raster format
exportgraphics(fig, 'output.pdf', 'ContentType', 'vector'); % vector format
What are the best options I can add to exportgraphics to get the highest-quality printed graphics, both for raster and vector graphics?

채택된 답변

Rik
Rik 2023년 6월 2일
For vector images only the contents of your figure matter: do you have raster images (e.g. with imshow or image)? If so, saving as vector image will not magically convert them and you're stuck with the native resolution of those elements.
For raster images you can set the DPI with the resolution parameter. The default is 150, but I would suggest using 300 as your default (and 600 if you really want high resolution). Take care of the font size, you might need to increase it by 25% for some software due to stupid technical reasons.
  댓글 수: 3
Rik
Rik 2023년 6월 5일
For vector images that command should give you the highest possible quality (unless there are rasterized elements in your figure).
For raster images, the command you showed gived a DPI of 600. I don't know what the limit is, but a higher DPI will result in a higher quality until the limits imposed by the Matlab renderer, your OS, and your graphics driver. I expect the limit is higher than 600 for most cases (perhaps around 1e3), but the gains in quality after 600 are marginal, while the file size will keep increasing. I would say 600 is a good balance between excellent quality and not yet excessive file size.
In short: yes. Glad to be of help.
Sim
Sim 2023년 6월 5일
Many many thanks :-) :-)

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

추가 답변 (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