Author: Herbert Melenk
GNUPLOT Interface for REDUCE
The gnuplot system provides easy to use graphics output for curves or surfaces which are defined by formulas and/or data sets. Gnuplot supports a variety of output devices such as VGA screen, postscript, picTeX, MS Windows. The REDUCE GNUPLOT package lets one use the gnuplot graphical output directly from inside REDUCE, either for the interactive display of curves/surfaces or for the production of pictures on paper.
Installation of the free Gnuplot software
The use of the GNUPLOT package requires the additional installation of the free gnuplot software. For BSD/Linux/Unix/Mac systems the expectation of the code is that invoking the command "gnuplot" as from a command-line will launch gnuplot, and the user needs to ensure that it has been installed and is properly on their PATH.
Mac OS X
For the Mac there are no precompiled versions of gnuplot distributed by the developers themselves. For obtaining a precompiled current version of gnuplot, we recommend to proceed as follows:
- Download the latest Mac OS X binary distribution of the free software Octave as a DMG. In that DMG there is a folder
Extras. This folder contains another DMG, which provides a precompiled
Gnuplot.appto your Application folder.
- There is a script
Gnuplot.app/Contents/Resources/bin/. The location of this has be added to your load path, e.g., for the bash:
- At that point the following should work in Reduce:
load_package gnuplot; plot(sin x,x=(-3 .. 3));
You will notice, however, that plotting is based on X11 then. We recommend to use instead the AquaTerm.app, which is included in the Gnuplot.app delivered with Octave. For using this, go
lisp (plotheader!* := "set term aqua");
in Reduce after loading gnuplot.