Printing Images
When you set the axesPosition
to[0 0 1 1]
so that it fills the entire figure, the aspect ratio is not preserved when you print because MATLAB®printing software adjusts the figure size when printing according to the figure'sPaperPosition
property. To preserve the image aspect ratio when printing, set the figure'sPaperPositionMode
to'auto'
from the command line.
set(gcf,'PaperPositionMode','auto') print
WhenPaperPositionMode
is set to'auto'
, the width and height of the printed figure are determined by the figure's dimensions on the screen, and the figure position is adjusted to center the figure on the page. If you want the default value ofPaperPositionMode
to be'auto'
, enter this line in yourstartup.m
file.
set(groot,'defaultFigurePaperPositionMode','auto')