Highest-quality printed graphics with exportgraphics

12 views (last 30 days)
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?

Accepted Answer

Rik on 2 Jun 2023
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.

Sign in to comment.

More Answers (0)


Find more on Printing and Saving in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!