Getting Started |
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 graphic file formats supported by MATLAB. There are two ways to print and export figures:
print
command
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 option under the File menu enables you to export the figure to a variety 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.
Images | Handle Graphics |