Printing and Exporting Figures with MATLAB | ![]() ![]() |
Example -- Setting the Paper Size to 8.5-by-14 Inches
By default, MATLAB uses 8.5-by-11 inch paper. This example shows how to change the setting to another size by selecting a paper type.
Legal
paper type from the list under Paper size. The width and height fields update to 8.5 and 14, respectively.
To perform this task with MATLAB commands, use,
Example -- Setting the Size of and Centering a Figure
This example sets a size of 5.5-by-3 inches for the figure and, if printing, centers it on the paper.
5.5
in the Width field and 3
in the Height field. (You can type these values or click the arrows to select the new size.)
To perform this task using MATLAB commands, first set PaperUnits
to inches
.
Now, use PaperSize
to return the size of the current paper.
Set the figure width to 5.5
and the height to 3
.
Calculate a left margin that centers the figure horizontally on the paper. Use the first element of PaperSize
(width of paper) for the calculation.
Calculate a bottom margin that centers the figure vertically on the paper. Use the second element of PaperSize
(height of paper) for the calculation.
You are now ready to set the figure size and print.
set(gcf, 'PaperPositionMode', 'manual'); myfiguresize = [left, bottom, width, height]; set(gcf, 'PaperPosition', myfiguresize); print
![]() | Changing Figure Size and Position | Fine-Tuning Your Output | ![]() |