If not nil, then plot2d will output a representation of the plot
which is suitable for openplot functions.
Function:OPENPLOT_CURVESlist rest-options
Takes a list of curves such as
[[x1,y1,x2,y2,...],[u1,v1,u2,v2,...],..]
or
[[[x1,y1],[x2,y2],...],.. ]
and plots them. This is similar to xgraph_curves, but uses the
open plot routines.
Addtional symbol arguments may be given such as
"{xrange -3 4}"
The following plots two curves, using big points, labeling the first one
jim and the second one jane.
EXPR is an expression to be plotted on y axis as
a function of 1 variable.
RANGE is of the form [var,min,max] and expr is assumed to
be an expression to be plotted against VAR.
In the second form of the function a list of expressions may
be given to plot against VAR. Truncation in the y direction will
be performed, for the default y range. It may be specified
as an option or using SET_PLOT_OPTION.
would make the point set [and subsequent ones], have
no lines between points, and to use large pixels.
See the man page on xgraph for more options to specify.
which produces a transformation from 3 space to 3 space, which
will be applied to the graph. A built in one is polar_xy which
gives the same as
make_transform([r,th,z],[r*cos(th),r*sin(th),z])
[RUN_VIEWER,TRUE] if not false, means run the viewer software - don't just
output a data file.
[GRID,30,30] means plot3d should divide the x range into 30 intervals
and similarly the y range.
[COLOUR_Z,false] applies to colouring done with plot_format ps.
[PLOT_FORMAT,OPENMATH] is for plot3d and currently OPENMATH,
GNUPLOT, PS, and GEOMVIEW are supported.
There are good quality public domain viewers for these formats.
They are openmath, izic, gnuplot, ghostview, and geomview.
The Openmath viewer is in the distribution, and is based on tcl/tk.
The executable is `maxima/bin/omplotdata'. The viewer lets you
zoom in, slide around, and rotate (if 3 dimensional). This format is
also the one used by netmath, for making plots with Netmath. (see
`http://www.ma.utexas.edu/users/wfs/netmath.html')
geomview is from the Geometry Center at the University of Minnesota, and
is available from
`http://www.geom.umn.edu/software/download/geomview.html' or by
anonymous ftp from `ftp://ftp.geom.umn.edu/pub/software/geomview/'. It
is currently not quite as pretty as izic, but provides excellent support
for multiple objects and multiple lights.
gnuplot is everywhere as is ghostview. We also provide mgnuplot,
a tcl interface for gnuplot, which lets you rotate the plots using
the mouse and a scale.
izic is available by ftp from zenon.inria.fr. Contact one of
{fournier,kajler,mourrain}@sophia.inria.fr.
It has beautiful colour gouraud shading, and very fast wireframe. It
runs on X windows.
which will plot a moebius band, parametrized by the 3 expressions given
as the first argument to plot3d. An additional optional argument
[grid,50,15] gives the grid number of rectangles in the x direction and
y direction.
/* REal part of z ^ 1/3 */
plot3d(r^.33*cos(th/3),[r,0,1],[th,0,6*%pi],
['grid,12,80],['PLOT_FORMAT,ps],
['TRANSFORM_XY,POLAR_TO_XY],['VIEW_DIRECTION,1,1,1.4],
['COLOUR_Z,true])
Here the View_direction indicates the direction from which we
take a projection. We actually do this from infinitely far away,
but parallel to the line from view_direction to the origin. This
is currently only used in 'ps' plot_format, since the other viewers
allow interactive rotating of the object.
Sometimes you may need to define a function to plot the expression. All
the arguments to plot3d are evaluated before being passed to plot3d, and
so trying to make an expression which does just what you want may be
difficult, and it is just easier to make a function.
writes to pstream a sequence of postscript commands which
plot EXPR for RANGE.
EXPR should be an expression of 1 variable.
RANGE should be of the form [variable,min,max]
over which to plot expr.
see CLOSEPS.
Function:CLOSEPS()
This should usually becalled at the end of a sequence of plotting
commands. It closes the current output stream PSTREAM, and sets
it to nil. It also may be called at the start of a plot, to ensure
pstream is closed if it was open. All commands which write to
pstream, open it if necessary. CLOSEPS is separate from the other
plotting commands, since we may want to plot 2 ranges or superimpose
several plots, and so must keep the stream open.
Function:SET_PLOT_OPTION(option)
option is of the format of one of the elements of the PLOT_OPTIONS
list.
Thus
SET_PLOT_OPTION([grid,30,40])
would change the default grid used by plot3d. Note that if the symbol
grid has a value, then you should quote it here:
SET_PLOT_OPTION(['grid,30,40])
so that the value will not be substituted.
Function:PSDRAW_CURVE(ptlist)
Draws a curve connecting the points in PTLIST. The latter
may be of the form [x0,y0,x1,y1,...] or [[x0,y0],[x1,y1],...]
The function JOIN is handy for taking a list of x's and a
list of y's and splicing them together.
PSDRAW_CURVE simply invokes the more primitive function
PSCURVE. Here is the definition: