Printing and Exporting Figures with MATLAB | ![]() ![]() |
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:
print
command for exporting.
getframe
offers some flexibility over the other methods in terms of what is exported and what format options you can set. For example, you can export a portion of a figure.
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.
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 | ![]() |