Printing and Exporting Figures with MATLAB    

Size and Position of Printed or Exported Figures

MATLAB enables you to set the size of your figure for printing and exporting. If you are printing, you can also set the position for the figure on the paper.

MATLAB's Default Size and Position Settings

The default output figure size is 8 inches wide by 6 inches high. This size maintains the aspect ratio (width to height) of MATLAB's default figure window.

If you print the figure, its default position is centered both horizontally and vertically when printed to the default paper size of 8.5-by-11 inches. The default paper orientation is portrait. The figure below shows how your figure looks when printed using MATLAB's default settings

.

Figure 2-3: Size and Position of a Figure Using MATLAB's Default Settings

Note the figure rectangle (dotted line) that surrounds the figure above. The size of your printed or exported figure is delimited by this rectangle. The rectangle includes the figure's background area and any titles, legends, user interface buttons, etc., that you have placed in the figure.

By default, MATLAB inverts the background color to white when printing or exporting. See Retaining Background Colors if you want a different background color.

Note that there are fewer ticks on the y-axis than the x- or z-axes shown in the figure. This is due to MATLAB's default scaling during printing or exporting. To prevent this, see Locking the Ticks and Limits of the Axes.

UI Controls or Images

If your figure includes UI controls or images, you get the best results by printing or exporting your figure using the size it has on the screen. For an example of how to do this, see Printing to a Printer at Screen Size. Note that UI controls are included in your output by default.


 Unit of Measure Changing Figure Size and Position