Getting Started Previous page   Next Page

Printing Graphics

You can print a MATLAB figure directly on a printer connected to your computer or you can export the figure to one of the standard graphics file formats supported by MATLAB. There are two ways to print and export figures:

See Preparing Graphs for Presentation for an example.

Printing from the Menu

There are four menu options under the File menu that pertain to printing:

Generally, use Print Preview to determine whether the printed output is what you want. If not, use the Page Setup dialog box to change the output settings. Select the Page Setup dialog box Help button to display information on how to set up the page.

Exporting Figure to Graphics Files

The Export Setup option in the File menu enables you to set a variety of figure characteristics, such as size and font type, as well as apply predefined templates to achieve standard-looking graphics files. After setup, you can export the figure to a number of standard graphics file formats.

Using the Print Command

The print command provides more flexibility in the type of output sent to the printer and allows you to control printing from M-files. The result can be sent directly to your default printer or stored in a specified file. A wide variety of output formats, including TIFF, JPEG, and PostScript, is available.

For example, this statement saves the contents of the current figure window as color Encapsulated Level 2 PostScript in the file called magicsquare.eps. It also includes a TIFF preview, which enables most word processors to display the picture:

To save the same figure as a TIFF file with a resolution of 200 dpi, use the command

If you type print on the command line,

MATLAB prints the current figure on your default printer.


Previous page  Images Handle Graphics Next page

© 1994-2005 The MathWorks, Inc.