annotate scripts/plot/print.m @ 10727:570f30a48732

split printing between backends
author Shai Ayal <shaiay@users.sourceforge.net>
date Thu, 24 Jun 2010 07:06:11 +0300
parents fbd7843974fa
children 3140cb7a05a1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10727
570f30a48732 split printing between backends
Shai Ayal <shaiay@users.sourceforge.net>
parents: 10711
diff changeset
1 ## Copyright (C) 2008, 2009 David Bateman
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
2 ##
5362
ef053d682e42 [project @ 2005-05-23 19:21:54 by jwe]
jwe
parents: 5361
diff changeset
3 ## This file is part of Octave.
ef053d682e42 [project @ 2005-05-23 19:21:54 by jwe]
jwe
parents: 5361
diff changeset
4 ##
ef053d682e42 [project @ 2005-05-23 19:21:54 by jwe]
jwe
parents: 5361
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
ef053d682e42 [project @ 2005-05-23 19:21:54 by jwe]
jwe
parents: 5361
diff changeset
6 ## under the terms of the GNU General Public License as published by
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6965
diff changeset
7 ## the Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6965
diff changeset
8 ## your option) any later version.
5362
ef053d682e42 [project @ 2005-05-23 19:21:54 by jwe]
jwe
parents: 5361
diff changeset
9 ##
ef053d682e42 [project @ 2005-05-23 19:21:54 by jwe]
jwe
parents: 5361
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
ef053d682e42 [project @ 2005-05-23 19:21:54 by jwe]
jwe
parents: 5361
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
ef053d682e42 [project @ 2005-05-23 19:21:54 by jwe]
jwe
parents: 5361
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ef053d682e42 [project @ 2005-05-23 19:21:54 by jwe]
jwe
parents: 5361
diff changeset
13 ## General Public License for more details.
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
14 ##
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6965
diff changeset
16 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6965
diff changeset
17 ## <http://www.gnu.org/licenses/>.
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
18
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
19 ## -*- texinfo -*-
9393
d6c99b2ee941 print.m: reimplement options -landscape and -portrait.
Ben Abbott <bpabbott@mac.com>
parents: 9337
diff changeset
20 ## @deftypefn {Function File} {} print ()
d6c99b2ee941 print.m: reimplement options -landscape and -portrait.
Ben Abbott <bpabbott@mac.com>
parents: 9337
diff changeset
21 ## @deftypefnx {Function File} {} print (@var{options})
d6c99b2ee941 print.m: reimplement options -landscape and -portrait.
Ben Abbott <bpabbott@mac.com>
parents: 9337
diff changeset
22 ## @deftypefnx {Function File} {} print (@var{filename}, @var{options})
7550
bffb1e2ab732 print.m: Figure handle as argument.
Ben Abbott <bpabbott@mac.com>
parents: 7543
diff changeset
23 ## @deftypefnx {Function File} {} print (@var{h}, @var{filename}, @var{options})
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
24 ## Print a graph, or save it to a file
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
25 ##
10472
944aa97069ed print.m: Provide default suffixes & validate hardcopy format.
Ben Abbott <bpabbott@mac.com>
parents: 10423
diff changeset
26 ## @var{filename} defines the file name of the output file. If the
944aa97069ed print.m: Provide default suffixes & validate hardcopy format.
Ben Abbott <bpabbott@mac.com>
parents: 10423
diff changeset
27 ## file name has no suffix, one is inferred from the specified
944aa97069ed print.m: Provide default suffixes & validate hardcopy format.
Ben Abbott <bpabbott@mac.com>
parents: 10423
diff changeset
28 ## device and appended to the file name. If no
9393
d6c99b2ee941 print.m: reimplement options -landscape and -portrait.
Ben Abbott <bpabbott@mac.com>
parents: 9337
diff changeset
29 ## filename is specified, the output is sent to the printer.
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
30 ##
9040
dbd0c77e575e Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
31 ## @var{h} specifies the figure handle. If no handle is specified
7550
bffb1e2ab732 print.m: Figure handle as argument.
Ben Abbott <bpabbott@mac.com>
parents: 7543
diff changeset
32 ## the handle for the current figure is used.
bffb1e2ab732 print.m: Figure handle as argument.
Ben Abbott <bpabbott@mac.com>
parents: 7543
diff changeset
33 ##
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
34 ## @var{options}:
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
35 ## @table @code
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
36 ## @item -P@var{printer}
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
37 ## Set the @var{printer} name to which the graph is sent if no
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
38 ## @var{filename} is specified.
9152
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
39 ## @item -G@var{ghostscript_command}
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9157
diff changeset
40 ## Specify the command for calling Ghostscript. For Unix and Windows,
9152
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
41 ## the defaults are 'gs' and 'gswin32c', respectively.
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
42 ## @item -color
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
43 ## @itemx -mono
9040
dbd0c77e575e Cleanup documentation file plot.texi
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
44 ## Monochrome or color lines.
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
45 ## @item -solid
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
46 ## @itemx -dashed
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
47 ## Solid or dashed lines.
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
48 ## @item -portrait
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
49 ## @itemx -landscape
9393
d6c99b2ee941 print.m: reimplement options -landscape and -portrait.
Ben Abbott <bpabbott@mac.com>
parents: 9337
diff changeset
50 ## Specify the orientation of the plot for printed output.
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
51 ## @item -d@var{device}
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
52 ## Output device, where @var{device} is one of:
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
53 ## @table @code
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
54 ## @item ps
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
55 ## @itemx ps2
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
56 ## @itemx psc
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
57 ## @itemx psc2
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
58 ## Postscript (level 1 and 2, mono and color)
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
59 ## @item eps
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
60 ## @itemx eps2
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
61 ## @itemx epsc
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
62 ## @itemx epsc2
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
63 ## Encapsulated postscript (level 1 and 2, mono and color)
6739
db0a05a61d09 [project @ 2007-06-15 21:59:16 by jwe]
jwe
parents: 6727
diff changeset
64 ## @item tex
db0a05a61d09 [project @ 2007-06-15 21:59:16 by jwe]
jwe
parents: 6727
diff changeset
65 ## @itemx epslatex
db0a05a61d09 [project @ 2007-06-15 21:59:16 by jwe]
jwe
parents: 6727
diff changeset
66 ## @itemx epslatexstandalone
db0a05a61d09 [project @ 2007-06-15 21:59:16 by jwe]
jwe
parents: 6727
diff changeset
67 ## @itemx pstex
db0a05a61d09 [project @ 2007-06-15 21:59:16 by jwe]
jwe
parents: 6727
diff changeset
68 ## @itemx pslatex
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9157
diff changeset
69 ## Generate a @LaTeX{} (or @TeX{}) file for labels, and eps/ps for
9107
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
70 ## graphics. The file produced by @code{epslatexstandalone} can be
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9157
diff changeset
71 ## processed directly by @LaTeX{}. The other formats are intended to
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9157
diff changeset
72 ## be included in a @LaTeX{} (or @TeX{}) document. The @code{tex} device
9107
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
73 ## is the same as the @code{epslatex} device.
9468
5af462716bff Add support for gnuplot's Lua-TikZ terminal.
Ben Abbott <bpabbott@mac.com>
parents: 9393
diff changeset
74 ## @item tikz
9758
09da0bd91412 Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents: 9468
diff changeset
75 ## Generate a @LaTeX{} file using gnuplot's Lua/TikZ terminal.
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
76 ## @item ill
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
77 ## @itemx aifm
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
78 ## Adobe Illustrator
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
79 ## @item cdr
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
80 ## @itemx corel
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
81 ## CorelDraw
6965
c962cc09067a [project @ 2007-10-06 04:54:36 by jwe]
jwe
parents: 6895
diff changeset
82 ## @item dxf
c962cc09067a [project @ 2007-10-06 04:54:36 by jwe]
jwe
parents: 6895
diff changeset
83 ## AutoCAD
c962cc09067a [project @ 2007-10-06 04:54:36 by jwe]
jwe
parents: 6895
diff changeset
84 ## @item emf
9107
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
85 ## @itemx meta
6965
c962cc09067a [project @ 2007-10-06 04:54:36 by jwe]
jwe
parents: 6895
diff changeset
86 ## Microsoft Enhanced Metafile
c962cc09067a [project @ 2007-10-06 04:54:36 by jwe]
jwe
parents: 6895
diff changeset
87 ## @item fig
7037
b1ca2c453b77 [project @ 2007-10-17 21:25:44 by jwe]
jwe
parents: 7032
diff changeset
88 ## XFig. If this format is selected the additional options
7040
1f16da18d85d [project @ 2007-10-19 18:24:19 by jwe]
jwe
parents: 7037
diff changeset
89 ## @code{-textspecial} or @code{-textnormal} can be used to control
9107
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
90 ## whether the special flag should be set for the text in
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
91 ## the figure (default is @code{-textnormal}).
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
92 ## @item hpgl
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
93 ## HP plotter language
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
94 ## @item mf
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
95 ## Metafont
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
96 ## @item png
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
97 ## Portable network graphics
7543
b84c5cbc0812 print.m: handle gif and jpg devices
John W. Eaton <jwe@octave.org>
parents: 7540
diff changeset
98 ## @item jpg
b84c5cbc0812 print.m: handle gif and jpg devices
John W. Eaton <jwe@octave.org>
parents: 7540
diff changeset
99 ## @itemx jpeg
b84c5cbc0812 print.m: handle gif and jpg devices
John W. Eaton <jwe@octave.org>
parents: 7540
diff changeset
100 ## JPEG image
b84c5cbc0812 print.m: handle gif and jpg devices
John W. Eaton <jwe@octave.org>
parents: 7540
diff changeset
101 ## @item gif
b84c5cbc0812 print.m: handle gif and jpg devices
John W. Eaton <jwe@octave.org>
parents: 7540
diff changeset
102 ## GIF image
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
103 ## @item pbm
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
104 ## PBMplus
6965
c962cc09067a [project @ 2007-10-06 04:54:36 by jwe]
jwe
parents: 6895
diff changeset
105 ## @item svg
c962cc09067a [project @ 2007-10-06 04:54:36 by jwe]
jwe
parents: 6895
diff changeset
106 ## Scalable vector graphics
7396
0114d8cd1587 [project @ 2008-01-17 21:55:55 by jwe]
jwe
parents: 7341
diff changeset
107 ## @item pdf
0114d8cd1587 [project @ 2008-01-17 21:55:55 by jwe]
jwe
parents: 7341
diff changeset
108 ## Portable document format
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
109 ## @end table
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
110 ##
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
111 ## If the device is omitted, it is inferred from the file extension,
9107
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
112 ## or if there is no filename it is sent to the printer as postscript.
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
113 ##
10423
dfc662a47b7a print.m: Add '-append' option.
Ben Abbott <bpabbott@mac.com>
parents: 10422
diff changeset
114 ## @item -d@var{ghostscript_device}
9152
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
115 ## Additional devices are supported by Ghostscript.
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
116 ## Some examples are;
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
117 ##
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
118 ## @table @code
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
119 ## @item ljet2p
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
120 ## HP LaserJet IIP
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
121 ## @item ljet3
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
122 ## HP LaserJet III
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
123 ## @item deskjet
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
124 ## HP DeskJet and DeskJet Plus
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
125 ## @item cdj550
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
126 ## HP DeskJet 550C
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
127 ## @item paintjet
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
128 ## HP PointJet
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
129 ## @item pcx24b
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
130 ## 24-bit color PCX file format
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
131 ## @item ppm
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
132 ## Portable Pixel Map file format
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
133 ## @end table
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
134 ##
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
135 ## For a complete list, type `system ("gs -h")' to see what formats
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
136 ## and devices are available.
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
137 ##
9393
d6c99b2ee941 print.m: reimplement options -landscape and -portrait.
Ben Abbott <bpabbott@mac.com>
parents: 9337
diff changeset
138 ## When the ghostscript is sent to a printer the size is determined
d6c99b2ee941 print.m: reimplement options -landscape and -portrait.
Ben Abbott <bpabbott@mac.com>
parents: 9337
diff changeset
139 ## by the figure's "papersize" property. When the ghostscript output
d6c99b2ee941 print.m: reimplement options -landscape and -portrait.
Ben Abbott <bpabbott@mac.com>
parents: 9337
diff changeset
140 ## is sent to a file the size is determined by the figure's
d6c99b2ee941 print.m: reimplement options -landscape and -portrait.
Ben Abbott <bpabbott@mac.com>
parents: 9337
diff changeset
141 ## "paperposition" property.
9152
4c9aff0c9a61 print.m: Use Ghostscript rather than ImageMagick's 'convert'.
Ben Abbott <bpabbott@mac.com>
parents: 9107
diff changeset
142 ##
10423
dfc662a47b7a print.m: Add '-append' option.
Ben Abbott <bpabbott@mac.com>
parents: 10422
diff changeset
143 ## @itemx -append
10711
fbd7843974fa Periodic grammar check of documentation files to ensure common format.
Rik <octave@nomad.inbox5.com>
parents: 10635
diff changeset
144 ## Appends the output to a pre-existing file. Presently only PDF,
10423
dfc662a47b7a print.m: Add '-append' option.
Ben Abbott <bpabbott@mac.com>
parents: 10422
diff changeset
145 ## and Postscript files are supported.
dfc662a47b7a print.m: Add '-append' option.
Ben Abbott <bpabbott@mac.com>
parents: 10422
diff changeset
146 ##
8889
665b264b6a50 Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents: 8746
diff changeset
147 ## @itemx -r@var{NUM}
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9157
diff changeset
148 ## Resolution of bitmaps in pixels per inch. For both metafiles and
9107
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
149 ## SVG the default is the screen resolution, for other it is 150 dpi.
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
150 ## To specify screen resolution, use "-r0".
8889
665b264b6a50 Compatible support of figure paper properties and resolution for the gnuplot backend.
Ben Abbott <bpabbott@mac.com>
parents: 8746
diff changeset
151 ##
9157
fce7315c1eee print.m: Fix typo, improvments to code, and allow for creation of tight bbox.
Ben Abbott <bpabbott@mac.com>
parents: 9152
diff changeset
152 ## @item -tight
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9157
diff changeset
153 ## Forces a tight bounding box for eps-files. Since the ghostscript
9157
fce7315c1eee print.m: Fix typo, improvments to code, and allow for creation of tight bbox.
Ben Abbott <bpabbott@mac.com>
parents: 9152
diff changeset
154 ## devices are conversion of an eps-file, this option works the those
fce7315c1eee print.m: Fix typo, improvments to code, and allow for creation of tight bbox.
Ben Abbott <bpabbott@mac.com>
parents: 9152
diff changeset
155 ## devices as well.
fce7315c1eee print.m: Fix typo, improvments to code, and allow for creation of tight bbox.
Ben Abbott <bpabbott@mac.com>
parents: 9152
diff changeset
156 ##
6965
c962cc09067a [project @ 2007-10-06 04:54:36 by jwe]
jwe
parents: 6895
diff changeset
157 ## @itemx -S@var{xsize},@var{ysize}
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9157
diff changeset
158 ## Plot size in pixels for EMF, GIF, JPEG, PBM, PNG and SVG. If
9107
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
159 ## using the command form of the print function, you must quote the
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
160 ## @var{xsize},@var{ysize} option. For example, by writing
9209
923c7cb7f13f Simplify TeXinfo files by eliminating redundant @iftex followed by @tex construction.
Rik <rdrider0-list@yahoo.com>
parents: 9157
diff changeset
161 ## @w{@code{"-S640,480"}}. The size defaults to that specified by the
9107
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
162 ## figure's paperposition property.
6965
c962cc09067a [project @ 2007-10-06 04:54:36 by jwe]
jwe
parents: 6895
diff changeset
163 ##
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
164 ## @item -F@var{fontname}
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
165 ## @itemx -F@var{fontname}:@var{size}
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
166 ## @itemx -F:@var{size}
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
167 ## @var{fontname} set the postscript font (for use with postscript,
9107
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
168 ## aifm, corel and fig). By default, 'Helvetica' is set for PS/Aifm,
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
169 ## and 'SwitzerlandLight' for Corel. It can also be 'Times-Roman'.
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
170 ## @var{size} is given in points. @var{fontname} is ignored for the
d0d507cbd123 Improvements to printing functionality.
Ben Abbott <bpabbott@mac.com>
parents: 9056
diff changeset
171 ## fig device.
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
172 ## @end table
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
173 ##
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
174 ## The filename and options can be given in any order.
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
175 ## @end deftypefn
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
176
10727
570f30a48732 split printing between backends
Shai Ayal <shaiay@users.sourceforge.net>
parents: 10711
diff changeset
177 function varargout = print (varargin)
7550
bffb1e2ab732 print.m: Figure handle as argument.
Ben Abbott <bpabbott@mac.com>
parents: 7543
diff changeset
178
10727
570f30a48732 split printing between backends
Shai Ayal <shaiay@users.sourceforge.net>
parents: 10711
diff changeset
179 f = gcf ();
570f30a48732 split printing between backends
Shai Ayal <shaiay@users.sourceforge.net>
parents: 10711
diff changeset
180 drawnow ();
570f30a48732 split printing between backends
Shai Ayal <shaiay@users.sourceforge.net>
parents: 10711
diff changeset
181 backend = (get (f, "__backend__"));
7550
bffb1e2ab732 print.m: Figure handle as argument.
Ben Abbott <bpabbott@mac.com>
parents: 7543
diff changeset
182
10727
570f30a48732 split printing between backends
Shai Ayal <shaiay@users.sourceforge.net>
parents: 10711
diff changeset
183 varargout = cell (1, nargout);
570f30a48732 split printing between backends
Shai Ayal <shaiay@users.sourceforge.net>
parents: 10711
diff changeset
184 [varargout{:}] = feval (strcat ("__", backend, "_print__"), varargin{:});
5363
37f62a7778c2 [project @ 2005-05-23 19:52:15 by jwe]
jwe
parents: 5362
diff changeset
185
5361
0ac38aea9f76 [project @ 2005-05-23 19:08:36 by jwe]
jwe
parents:
diff changeset
186 endfunction