GNUPlot Manual
GNUPlot Manual
GNUPlot Manual
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
36 SET-SHOW gnuplot 4.0 81<br />
36.45 Output<br />
By default, screens are displayed to the standard output.<br />
display to the specified file or device.<br />
Syntax:<br />
set output {""}<br />
show output<br />
The set output command redirects the<br />
The filename must be enclosed in quotes. If the filename is omitted, any output file opened by a<br />
previous invocation of set output will be closed and new output will be sent to STDOUT. (If you give<br />
the command set output "STDOUT", your output may be sent to a file named "STDOUT"! ["May<br />
be", not "will be", because some terminals, like x11, ignore set output.])<br />
MSDOS users should note that the \ character has special significance in double-quoted strings, so<br />
single-quotes should be used for filenames in different directories.<br />
When both set terminal and set output are used together, it is safest to give set terminal first,<br />
because some terminals set a flag which is needed in some operating systems. This would be the case,<br />
for example, if the operating system needs to know whether or not a file is to be formatted in order to<br />
open it properly.<br />
On machines with popen functions (Unix), output can be piped through a shell command if the first<br />
non-whitespace character of the filename is ’|’. For instance,<br />
set output "|lpr -Plaser filename"<br />
set output "|lp -dlaser filename"<br />
On MSDOS machines, set output "PRN" will direct the output to the default printer. On VMS,<br />
output can be sent directly to any spooled device. It is also possible to send the output to DECnet<br />
transparent tasks, which allows some flexibility.<br />
36.46 Parametric<br />
The set parametric command changes the meaning of plot (splot) from normal functions to parametric<br />
functions. The command unset parametric restores the plotting style to normal, single-valued<br />
expression plotting.<br />
Syntax:<br />
set parametric<br />
unset parametric<br />
show parametric<br />
For 2-d plotting, a parametric function is determined by a pair of parametric functions operating on a<br />
parameter. An example of a 2-d parametric function would be plot sin(t),cos(t), which draws a circle<br />
(if the aspect ratio is set correctly — see set size (p. 91)). gnuplot will display an error message if<br />
both functions are not provided for a parametric plot.<br />
For 3-d plotting, the surface is described as x=f(u,v), y=g(u,v), z=h(u,v). Therefore a triplet of functions<br />
is required. An example of a 3-d parametric function would be cos(u)*cos(v),cos(u)*sin(v),sin(u),<br />
which draws a sphere. gnuplot will display an error message if all three functions are not provided for<br />
a parametric splot.<br />
The total set of possible plots is a superset of the simple f(x) style plots, since the two functions can<br />
describe the x and y values to be computed separately. In fact, plots of the type t,f(t) are equivalent to<br />
those produced with f(x) because the x values are computed using the identity function. Similarly, 3-d<br />
plots of the type u,v,f(u,v) are equivalent to f(x,y).<br />
Note that the order the parametric functions are specified is xfunction, yfunction (and zfunction) and<br />
that each operates over the common parametric domain.<br />
Also, the set parametric function implies a new range of values. Whereas the normal f(x) and f(x,y)<br />
style plotting assume an xrange and yrange (and zrange), the parametric mode additionally specifies a