Printing and Exporting Figures with MATLAB    

Paper Size and Type

Paper size is defined by a width and height, as well as by a unit of measure. For example, the width may be set to 8.5, the height to 11, and the unit of measure set to inches.

Paper type is a convenient way of referring to a certain paper size. It gives names to specific combinations of width, height and unit of measure. For example, the paper type "US Letter" is 8.5-by-11 inches, and the paper type "A4" is 210-by-297 millimeters.

You can set the paper size by specify the dimensions or by choosing from a list of predefined paper types. If you do not set a paper size or type, MATLAB uses the default paper size of 8.5-by-11 inches.

Paper size and paper type settings are interrelated -- if you set a paper type, MATLAB updates the paper size. For example, if you set the paper type to US Legal, MATLAB updates the width of the paper to 8.5 inches and the height to 14 inches.

Built-In and Printer-Specific Paper Types

There are two kinds of paper types:

Changing Paper Size or Type

To change the paper size or paper type, use one of the following:

Using the Page Setup Dialog Box

  1. Select Page Setup from the figure window's File menu.
  2. From the Paper tab select a paper type from the list under Paper size.
  1. If there is no paper type with suitable dimensions, enter your own dimensions in the Width and Height fields. Make sure Units is set appropriately (to inches, centimeters, points, or normalized). When you enter your own values, the paper type is set to <custom>.

    Note: On Windows, printers often have multiple paper types that define the same paper size. MATLAB sends the size you requested to the printer and Windows chooses a correct paper type for the size. It may not be the paper type you expected.

  1. Preview the image before printing to see if you need to reset the size and/or position of the figure on the paper.
  2. Click OK.

Using MATLAB Commands

Set the PaperType property to one of the built-in MATLAB paper types, or set the PaperSize property to the dimensions of the paper.

When you select a paper type, the unit of measure is not automatically updated. We recommend that you set the PaperUnits property first. See Unit of Measure for more information.

For example, these commands set the units to centimeters and the paper type to A4.

Note that MATLAB does not have a setting for millimeters, so it is necessary to define metric paper sizes in terms of centimeters.

This example sets the units to inches and sets the paper size of 5-by-7 inches.

If you set a paper size for which there is no matching paper type, the PaperType property is automatically set to '<custom>'.

Changing the Default Paper Type

If you frequently use the same paper type, and do not want to have to set it each time you print, set the default value for PaperType in your startup.m file, as follows

where paper_type is one of the valid MATLAB PaperType values.


 Setting up the Page Paper Orientation