Printing and Exporting Figures with MATLAB    

Exporting


Overview

Exporting

Exporting saves figures as graphics-format files, enabling you to import them into another application, such as a word processor.

Exporting to a File

Exporting to a file saves your figure directly to the file using one of several supported file formats. For instructions, see one of the following:

Exporting to the Clipboard (Windows Only)

Exporting to the clipboard puts a copy of your figure onto the Windows clipboard. The clipboard is a Windows-only feature that enables you to store graphics for paste operations. For instructions, see one of the following:

Relationship to Printing

Exporting and printing are closely related operations in MATLAB. They both enable graphical output and are affected by many of the same settings. The table below compares what is involved in each operation and is followed by a description of the shared settings.

Exporting
Printing
The figure is saved as a graphics-format file. MATLAB supports both bitmap (raster) and vector formats: AI, BMP*, EMF*, EPS, HDF, HPGL, JPEG, PBM, PCX, PGM, PNG, PPM, TIFF.
*These formats can also be exported to the clipboard
The figure is printed immediately or is saved to a file that can be printed later.
No paper information is included.
Paper information is included in the print job or in the file to be printed later. This includes the placement of the figure on the page (using offset values) and its orientation.
No printer-specific information is included.
Includes printer-specific information whether the figure is printed directly or saved to a file that will be printed later. Supported drivers include Epson, HP, Windows, and PostScript.
Some output formats are created using Ghostscript.
Some print outputs are created using Ghostscript.

Settings That Affect Both Exporting and Printing

The list below summarizes the settings that affect both exporting and printing.

As an example of how a shared setting may impact your work, consider a figure for which you have set the background color to blue for exporting. If you then print the same figure, it will also have a blue background.

Encapsulated PostScript and PostScript

Encapsulated PostScript (EPS) and PostScript are frequently confused. EPS, which uses PostScript, is a graphics file format used for exporting. PostScript is a printer driver.

The choice between using EPS or PostScript should depend mainly on whether you want to import a figure into another application or send it directly to a printer. One other consideration is printer support. While your printer must be PostScript-compatible to use the PostScript printer driver, it may not need to be PostScript compatible to print a document containing an EPS file. This depends on which application you import the figure to. See EPS Files for more information.


 Example - Fine-Tuning a Figure Exporting Quick Start