Graphics | ![]() ![]() |
Printing the Figure
After you have changed the settings to make your printed figure look the way you want, you are ready to print the figure. This section tells you how to print your figure to a printer or to a file using:
Note
Before printing the figure, preview the print image by selecting Print
Preview from the figure window's File menu. Use the Page Setup dialog box
or the set command to adjust the look of the exported figure. See "Changing
the Figure's Settings" on page 6-30 for details.
|
From the Windows Print Dialog Box
MATLAB for Windows uses the standard Windows Print dialog box, which normally comes with Windows software products. It enables you to:
Select Print from the figure window's File menu to invoke the Print dialog box. For examples, see Printing to a Printer and Printing to a File.
From the UNIX Print Dialog Box
MATLAB for UNIX has a Print dialog box and an associated Printing Options dialog box.
Print Dialog Box. The Print dialog box enables you to:
Select Print from the figure window's File menu to invoke the Print dialog box. For examples, see Printing to a Printer and Printing to a File.
Printing Options Dialog Box. The Printing Options dialog box enables you to set some print settings just before printing, such as the rendering method to use, or the resolution of the printed figure, in dots per inch. See Rendering the Figure for information about rendering.
Click the Options button on the Print dialog box to invoke the Printing Options dialog box.
From the Command Line
Use the print
command to print the figure to a printer or to a file.
print -device -options filename
where the command arguments are:
-device |
A printer, such as a Hewlett-Packard DeskJet 500. Some commonly used printers and their device specifiers are: | ||
|
Canon BubbleJet BJ200 color | -dbj200 |
|
|
Canon BubbleJet BJ600/4000/70 color | -dbj600 |
|
|
Epson and compatible 9- or 24-pin dot matrix printers | -depson |
|
|
HP DeskJet 500 | -ddjet500 |
|
|
HP LaserJet III | -dljet3 |
|
|
PostScript Level 2 black and white | -dps2 |
|
|
Postscript Level 2 color | -dpsc2 |
|
|
If you do not specify a printer, MATLAB uses the default device specified in printop.m for your platform. See the print reference page for a list of supported printers (i.e., drivers). | ||
-options |
Specifies options that control some aspects of the look of the printed figure. It can also control the action to be taken, or specify the figure to be printed or exported. Unlike the properties you set with the set function, these values are not saved with the figure. You must specify them each time you print the figure.Commonly used options are: | ||
|
-append |
Append the figure to an existing PostScript file. PostScript only. | |
|
-f |
Handle of the figure to print. For Figure No. 2, specify -f2 . By default MATLAB prints the last active figure. | |
|
-noui |
Suppress printing of uicontrols. | |
|
-P |
Printer to which the figure is printed. UNIX only. | |
|
-r |
Resolution in dots per inch. | |
|
See the print reference page for a list of supported options. | ||
filename |
Specifies the name of the file to which the figure is printed or appended for later printing. If you do not specify a filename, the figure is printed to a printer. If you are printing a figure to a new file and do not specify a file extension, print appends an extension that is appropriate for the device . |
![]() | Changing the Figure's Settings | Exporting a Figure in Graphics Format | ![]() |