14.10.2014 Views

gnuplot documentation

gnuplot documentation

gnuplot documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

118 <strong>gnuplot</strong> 4.3 70 SET-SHOW<br />

70.47 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 2D plotting, a parametric function is determined by a pair of parametric functions operating on a<br />

parameter. An example of a 2D 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. 129)). <strong>gnuplot</strong> will display an error message if<br />

both functions are not provided for a parametric plot.<br />

For 3D 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 3D parametric function would be cos(u)*cos(v),cos(u)*sin(v),sin(u),<br />

which draws a sphere. <strong>gnuplot</strong> 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, 3D<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<br />

trange, urange, and vrange. These ranges may be set directly with set trange, set urange, and set<br />

vrange, or by specifying the range on the plot or splot commands. Currently the default range for<br />

these parametric variables is [-5:5]. Setting the ranges to something more meaningful is expected.<br />

70.48 Plot<br />

The show plot command shows the current plotting command as it results from the last plot and/or<br />

splot and possible subsequent replot commands.<br />

In addition, the show plot add2history command adds this current plot command into the history.<br />

It is useful if you have used replot to add more curves to the current plot and you want to edit the<br />

whole command now.<br />

70.49 Pm3d<br />

pm3d is an splot style for drawing palette-mapped 3d and 4d data as color/gray maps and surfaces. It<br />

uses a pm3d algorithm which allows plotting gridded as well as non-gridded data without preprocessing,<br />

even when the data scans do not have the same number of points.<br />

Drawing of color surfaces is available on terminals supporting filled colored polygons with color mapping<br />

specified by palette. Currently supported terminals include<br />

Screen terminals:<br />

OS/2 Presentation Manager<br />

X11<br />

Linux VGA (vgagl)<br />

GGI<br />

Windows<br />

AquaTerm (Mac OS X)<br />

wxWidgets (wxt)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!