[-ddevicetype][-options][filename][pcmd,dev] = printopt
print with no arguments sends the contents of the current figure window to the default printer.
print filename saves the current figure window to the designated filename in the default device format. If filename does not include an extension, then an appropriate extension like .ps or .eps is appended to it, depending on the default device.
Directly supported device types include:
---------------------------------------------------------- Device Description ----------------------------------------------------------In general, Level 2 PostScript files are smaller and render more quickly when printing. However, not all PostScript printers support Level 2, so try to determine the capabilities of your printer before using the-dpsPostScript for black and white printers-dpscPostScript for color printers-dps2Level 2 PostScript for black and white printers-dpsc2Level 2 PostScript for color printers-depsEncapsulated PostScript (EPSF)-depscEncapsulated color PostScript (EPSF)-deps2Encapsulated Level 2 PostScript (EPSF)-depsc2Encapsulated Level 2 color PostScript (EPSF)-dhpglHPGL compatible with HP 7475A plotter-dillAdobe Illustrator 88 compatible illustration file ----------------------------------------------------------
print command.Additional devices supported via the Ghostscript post processor, which converts PostScript files into other formats, are listed below. This feature is available only on UNIX and PC systems.
--------------------------------------------------------------------------- Ghostscript Description Device ----------------------------------------------------------------------------dlaserjetHP LaserJet-dljetplusHP LaserJet+-dljet2pHP LaserJet IIP-dljet3HP LaserJet III-dcdeskjetHP DeskJet 500C with 1 bit/pixel color-dcdjcolorHP DeskJet 500C with 24 bit/pixel color and high-quality color (Floyd-Steinberg) dithering-dcdjmonoHP DeskJet 500C printing black only-ddeskjetHP DeskJet and DeskJet Plus-dpaintjetHP PaintJet color printer-dpjetxlHP PaintJet XL color printer-dbj10eCanon BubbleJet BJ10e-dln03DEC LN03 printer-depsonEpson-compatible dot matrix printer (9- or 24-pin)-deps9highEpson-compatible 9-pin, interleaved lines (triple resolution)-depsoncEpson LQ-2550 and Fujitsu 3400/2400/1200 color printers-dgif88-bit color GIF file format-dpcx16Older color PCX file format (EGA/VGA, 16-color)-dpcx256Newer color PCX file format (256-color) ---------------------------------------------------------------------------
print -options filename specifies an additional print option. Options supported on all devices are:
---------------------------------------------------- Option Description ----------------------------------------------------MS-Windows-only devices and options are:-appendAppend to specified file, do not overwrite-epsiAdd 1-bit deep EPSI preview-PprinterSpecify printer to use-fhandleHandle of figure to print-snameName of SIMULINK system window to print ----------------------------------------------------
------------------------------------------------------------- Windows Description Option -------------------------------------------------------------Macintosh-only devices and options are:-dwinUse Windows printing services-dwinc Use color Windows printing services-dmetaPut on clipboard in Windows metafile format-dbitmapPut on clipboard in Windows bitmap format-dsetupBring up Print Setup dialog box, but do not print-vVerbose mode - bring up Print dialog box (normally suppressed) -------------------------------------------------------------
---------------------------------------------------------------
Mac Option Description
---------------------------------------------------------------
-dmac Send figure, in monochrome, to currently installed
printer
---------------------------------------------------------------
By default, MATLAB changes the normally black figure background color to white and changes the normally white axis lines and labels to black. You can maintain the white on black figure colors by setting the InvertHardCopy figure property to off:
set(gcf,'InvertHardCopy','off')
To obtain hardcopy output that matches what you see on the screen, set InvertHardCopy to off and select a color device type. You must send the file to a color printer unless the figure colormap is a grayscale (such as that created with colormap(gray)). In addition, to obtain true WYSIWYG output, you must adjust the width and height of the figure's PaperPostion property so that it has the same aspect ratio as the width and height of the figure's Position property. See figure for details.MATLAB always produces graduated output for surfaces and patches, even for black and white output devices. However lines and text are printed in black or white.
Note that uicontrols and uimenus are not printed. See capture (UNIX systems only) to print a figure with these special widgets.
[pcmd,dev] = printopt returns strings describing the current settings for printopt, an M-file used by print that you or your system manager can edit to indicate your default printer type and destination. pcmd is a string containing the print command that print uses to spool a file to the printer. Its default is platform-dependent:
---------------------- UNIXlpr -rWindowsunusedVMSPRINT/DELETESGIlp----------------------
dev is a string that contains the device options for the print command. Its default is also platform-dependent:
------------------------- UNIX & VMS-dpsWindows-dwinMacintosh-dwin-------------------------
print meshdata -depsc2
saves the contents of the current figure as Level 2 color Encapsulated PostScript in the file called meshdata.eps.
orient
All the properties of figure objects.(c) Copyright 1994 by The MathWorks, Inc.