PLOT _ _ _ _ _ _ _ _ _ _ _ _ command
The command plot is the main entry for drawing a picture from inside REDUCE.
where <spec> is a <function>, a <range> or an <option>.
<function>:
- an expression depending on one unknown (e.g. sin(x) or two unknowns (e.g. sin(x+y),
- an equation with a function on its right-hand side and a single name on its left-hand side (e.g. z=sin(x+y) where the name on the left-hand side specifies the dependent variable.
- a list of functions: if in 2 dimensions the picture should have more than one curve the expressions can be given as list (e.g. {sin(x),cos(x)}).
- an equation with zero left or right hand side describing an implicit curve in two dimensions (e.g. x**3+x*y**3-9x=0).
- a point set: the graph can be given as point set in 2 dimensions or a pointset or pointset list in 3 dimensions.
<range>:
Each dependent and independent variable can be limited to an interval by an equation where the left-hand side specifies the variable and the right-hand side defines the interval, e.g. x=( -3 .. 5).
If omitted the independent variables range from -10 to 10 and the dependent variable is limited only by the precision of the IEEE floating point arithmetic.
<option>:
An option can be an equation equating a variable and a value (in general a string), or a keyword(GNUPLOT switch). These have to be included in the gnuplot command arguments directly. Strings have to be enclosed in string quotes (see string). Available options are:
title: assign a heading (default: empty)
xlabel: set label for the x axis
ylabel: set label for the y axis
zlabel: set label for the z axis
terminal: select an output device
size: rescale the picture
view: set a viewpoint
(no) contour: 3d: add contour lines
(no) surface: 3d: draw surface (default: yes)
(no) hidden3d: 3d: remove hidden lines (default: no)
plot(cos x); plot(s=sin phi,phi=(-3 .. 3)); plot(sin phi,cos phi,phi=(-3 .. 3)); plot (cos sqrt(x**2 + y**2),x=(-3 .. 3),y=(-3 .. 3),hidden3d); plot {{0,0},{0,1},{1,1},{0,0},{1,0},{0,1},{0.5,1.5},{1,1},{1,0}}; on rounded; w:=for j:=1:200 collect {1/j*sin j,1/j*cos j,j/200}$ plot w;
Additional control of the plot operation: plotrefine, plot_xmesh, plot_ymesh, trplot, plotkeep, show_grid.