Printing and Exporting Figures with MATLAB | ![]() ![]() |
Printed output normally goes directly to a printer. If you prefer to save a figure in a file so that it can be printed later, you can print the figure to a file.
Printing to a file is not the same operation as exporting to a graphics-format file. Exporting produces a bitmapped or vectorized image file, which must be imported into another application before it can be sent to a printer.
If you plan to append additional figures to the file later, you must use one of MATLAB's built-in PostScript drivers.
How to Print to File
To print your figure to a file, use one of the following:
filename
specified
If you print to file using the graphical user interface and a Windows driver (-dwin
or -dwinc
), the file is formatted using the printer's native driver. If you use the print
command and specify a Windows driver, the file is formatted using one of its built-in PostScript drivers.
When you print a figure to file, and don't specify a printer driver, MATLAB uses the printer driver defined in printopt.m
. If this default will not work with the printer you plan to use later, specify a different one. See Printer Drivers if you need instructions.
When printing to a file, you must specify a filename. Including a file extension is optional. If you do not include an extension, an appropriate extension is added to your filename based on the printer driver used.
![]() | HPGL Drivers | Using the Windows User Interface | ![]() |