% -*- texinfo -*- % @deftypefn {Function File} {} print (@var{filename}, @var{options}) % @deftypefnx {Function File} {} print (@var{h}, @var{filename}, @var{options}) % Print a graph, or save it to a file % % @var{filename} defines the file name of the output file. If no % filename is specified, output is sent to the printer. % % @var{h} specifies the figure handle. If no handle is specified % the handle for the current figure is used. % % @var{options}: % @table @code % @item -P@var{printer} % Set the @var{printer} name to which the graph is sent if no % @var{filename} is specified. % @item -G@var{ghostscript_command} % Specify the command for calling Ghostscript. For Unix and Windows, % the defaults are 'gs' and 'gswin32c', respectively. % @item -color % @itemx -mono % Monochrome or color lines. % @item -solid % @itemx -dashed % Solid or dashed lines. % @item -portrait % @itemx -landscape % Plot orientation, as returned by 'orient'. % @item -d@var{device} % Output device, where @var{device} is one of: % @table @code % @item ps % @itemx ps2 % @itemx psc % @itemx psc2 % Postscript (level 1 and 2, mono and color) % @item eps % @itemx eps2 % @itemx epsc % @itemx epsc2 % Encapsulated postscript (level 1 and 2, mono and color) % @item tex % @itemx epslatex % @itemx epslatexstandalone % @itemx pstex % @itemx pslatex % Generate a @LaTeX{} (or @TeX{}) file for labels, and eps/ps for % graphics. The file produced by @code{epslatexstandalone} can be % processed directly by @LaTeX{}. The other formats are intended to % be included in a @LaTeX{} (or @TeX{}) document. The @code{tex} device % is the same as the @code{epslatex} device. % @item ill % @itemx aifm % Adobe Illustrator % @item cdr % @itemx corel % CorelDraw % @item dxf % AutoCAD % @item emf % @itemx meta % Microsoft Enhanced Metafile % @item fig % XFig. If this format is selected the additional options % @code{-textspecial} or @code{-textnormal} can be used to control % whether the special flag should be set for the text in % the figure (default is @code{-textnormal}). % @item hpgl % HP plotter language % @item mf % Metafont % @item png % Portable network graphics % @item jpg % @itemx jpeg % JPEG image % @item gif % GIF image % @item pbm % PBMplus % @item svg % Scalable vector graphics % @item pdf % Portable document format % @end table % % If the device is omitted, it is inferred from the file extension, % or if there is no filename it is sent to the printer as postscript. % % @item -d@var{gs_device} % Additional devices are supported by Ghostscript. % Some examples are; % % @table @code % @item ljet2p % HP LaserJet IIP % @item ljet3 % HP LaserJet III % @item deskjet % HP DeskJet and DeskJet Plus % @item cdj550 % HP DeskJet 550C % @item paintjet % HP PointJet % @item pcx24b % 24-bit color PCX file format % @item ppm % Portable Pixel Map file format % @end table % % For a complete list, type `system ('gs -h')' to see what formats % and devices are available. % % For output sent to a printer, the size is determined by the % figure's "papersize" property. For output to a file the, size % is determined by the 'paperposition' property. % % @itemx -r@var{NUM} % Resolution of bitmaps in pixels per inch. For both metafiles and % SVG the default is the screen resolution, for other it is 150 dpi. % To specify screen resolution, use '-r0'. % % @item -tight % Forces a tight bounding box for eps-files. Since the ghostscript % devices are conversion of an eps-file, this option works the those % devices as well. % % @itemx -S@var{xsize},@var{ysize} % Plot size in pixels for EMF, GIF, JPEG, PBM, PNG and SVG. If % using the command form of the print function, you must quote the % @var{xsize},@var{ysize} option. For example, by writing % @w{@code{'-S640,480'}}. The size defaults to that specified by the % figure's paperposition property. % % @item -F@var{fontname} % @itemx -F@var{fontname}:@var{size} % @itemx -F:@var{size} % @var{fontname} set the postscript font (for use with postscript, % aifm, corel and fig). By default, 'Helvetica' is set for PS/Aifm, % and 'SwitzerlandLight' for Corel. It can also be 'Times-Roman'. % @var{size} is given in points. @var{fontname} is ignored for the % fig device. % @end table % % The filename and options can be given in any order. % @end deftypefn