The `set parametric` command changes the meaning of `plot` (Note:plot )
((`splot` (Note:splot )) from normal functions to parametric
functions. The command `set noparametric` restores the plotting style to
normal, single-valued expression plotting.
Syntax:
set parametric
set noparametric
show parametric
For 2-d plotting, a parametric function is determined by a pair of parametric
functions operating on a parameter. An example of a 2-d parametric function
would be `plot sin(t),cos(t)`, which draws a circle (if the aspect ratio is
set correctly---see `set size` (Note:size )). `gnuplot`
(Note:gnuplot ) will display an error message if both functions are not
provided for a parametric `plot`.
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 is required. An example of a 3-d parametric
function would be `cos(u)*cos(v),cos(u)*sin(v),sin(u)`, which draws a sphere.
`gnuplot` will display an error message if all three functions are not
provided for a parametric `splot`.
The total set of possible plots is a superset of the simple f(x) style plots,
since the two functions can describe the x and y values to be computed
separately. In fact, plots of the type t,f(t) are equivalent to those
produced with f(x) because the x values are computed using the identity
function. Similarly, 3-d plots of the type u,v,f(u,v) are equivalent to
f(x,y).
Note that the order the parametric functions are specified is xfunction,
yfunction (and zfunction) and that each operates over the common parametric
domain.
Also, the `set parametric` function implies a new range of values. Whereas
the normal f(x) and f(x,y) style plotting assume an xrange and yrange (and
zrange), the parametric mode additionally specifies a trange, urange, and
vrange. These ranges may be set directly with `set trange` (Note:trange ),
`set urange` (Note:urange ), and `set vrange` (Note:vrange ), or by
specifying the range on the plot or splot commands. Currently the default
range for these parametric variables is [-5:5]. Setting the ranges to
something more meaningful is expected.