How do I set the resolution for exporting from a figure window?

How do I set the resolution for exporting from a figure window?
Currently I am only able to set this when printing my figure to a file from the command line.
print -djpeg <filename> -r96

 Accepted Answer

This has been forwarded to our development staff so that they may consider implementing it in a future version of MATLAB.
The only known workaround is to save your figures from the command line so that you may specify the resolution (as shown in the following code).
print -djpeg <filename> -r96

1 Comment

Hello Jan,
The text does change in size when the resolution value is changed (e.g. -r50, -r96, -r150). The issue that you are probably experiencing is that the GUI figure's 'PaperPosition' property is already scaling the figure to a different size, independent of the resolution. This will scale the UI components with 'normalized' units, but most text uses fixed 'FontUnits' (defaults to 'points'), so these will not scale with the figure.
I would suggest playing around with the 'PaperPosition' and 'PaperSize' properties of the figure until you get it looking right when printed at the default resolution. Setting 'PaperPositionMode' to 'auto' may be a quick shortcut to that. Then you can play with the resolution value to scale the image directly.
Please see the documentation for the "print" function for more information.
-Cam

Sign in to comment.

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!