Mercurial > hg > octave-lojdl
changeset 14456:05635e4c605a
Improve documentation for print().
* plot.txi
* print.m
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Sun, 11 Mar 2012 20:54:47 -0400 |
parents | c57f9c911053 |
children | 008a29999c3d |
files | doc/interpreter/plot.txi scripts/plot/print.m |
diffstat | 2 files changed, 29 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/plot.txi +++ b/doc/interpreter/plot.txi @@ -834,15 +834,22 @@ @cindex printing plots @cindex saving plots -The @code{print} command allows you to save plots in a variety of -formats. For example, +The @code{print} command allows you to send plots to you printer and +to save plots in a variety of formats. For example, + +@example +print -dpsc +@end example + +@noindent +prints the current figure to a color PostScript printer. And, @example print -deps foo.eps @end example @noindent -writes the current figure to an encapsulated PostScript file called +saves the current figure to an encapsulated PostScript file called @file{foo.eps}. @DOCSTRING(print)
--- a/scripts/plot/print.m +++ b/scripts/plot/print.m @@ -21,17 +21,29 @@ ## @deftypefnx {Function File} {} print (@var{options}) ## @deftypefnx {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 the -## file name has no suffix, one is inferred from the specified -## device and appended to the file name. If no -## filename is specified, the output is sent to the printer. +## Print a graph, or save it to a file. Both output formatted for +## printing (PDF and PostScript), and many bitmapped and vector +## image formats are supported. ## ## @var{h} specifies the figure handle. If no handle is specified ## the handle for the current figure is used. ## -## @var{options}: +## @var{filename} defines the name of the output file. If the +## file name has no suffix, one is inferred from the specified +## device and appended to the file name. If no filename is +## specified, the output is sent to the printer. +## +## For output to a printer, to a PostScript file, or a PDF file, +## the paper size is specified by the figure's @code{papersize} +## property. The location and size of the image on the page are +## specified by the figure's @code{paperposition} property. The +## orientation of the page is specified by the figure's +## @code{paperorientation} property. +## +## The width and height of images are specified by the figure's +## @code{paperpositon(3:4)} property values. +## +## The @code{print} command supports several @var{options}: ## ## @table @code ## @item -f@var{h}