
To build, you need first to get PLplot. You can find it at

	ftp://dino.ph.utexas.edu/plplot/snapshots/plplot-961023.tar.gz

Unpack plplot-961023.tar.gz in a suitable directory, such as /usr/local/src.
Apply the patch found in this distribution, plplot-961023-980401.patch:

	cd /usr/local/src/plplot-961023
	patch -p1 -s < plplot-961023-980401.patch

Then ./configure. You *must* use the 'double' version of the library.

# plplot configure example with Tcl/Tk and shared libs (your platform might
not be supported)

	./configure --with-gcc=yes --enable-f77=no --enable-cxx=no \
	--with-double --with-shlib --disable-itcl --disable-dp \
	--x-includes=/usr/include --x-libraries=/usr/lib

If you want Tk support, you must use Tcl/Tk versions 7.6/4.2.
They must be already installed.

There are some problems making plplot. All trivial.

Then 'make', 'make cdemos', 'cd tmp', and run the demos:

Run the xwin demos:

	for i in x??c; do ./$i -dev xwin; done	

Run the tk demos, if you build with tk support

	for i in x??c; do ./$i -dev tk; done	

and finaly, install,

	make install

You might have some minor problems again.

Then, unpack this distribution (you have already done it).

You have a 'demo' directory, which has the plplot demos C sources,
x??c.c, the equivalent octave script files, x??c.m, and some new demos,
p??.m.

You have a 'PLplot' directory with modified versions of the standard
octave plot command, plus a lot of new ones ready for Octave use. You
must have it on your LOADPATH before the standard octave/gnuplot plot
scripts. If you install it in the octave 'm' directory, usually
/usr/local/share/octave/2.0.11/m/ this will happen automatically.

You have a misc directory with some other octave demos/utilities.

You have an etc directory where the "documentation" is. You are not advised
to do a 'make distclean' in this directory, as you might lack some
needed utilities.

You have the directory where the README, INSTALL, PROBLEMS, BUGS, ToDo, are,
plus 'plplot.h', 'plplot_octave.cc', 'plplot_stub.m', massage.c, etc.

plplot.h is the main (only) important file. It is a massaged version of plplot's
plplot.h file, ready for use with Holt's matwrap, which you can find at

	http://www.klab.caltech.edu/~holt/matwrap/

As usual, you should get the last version, 0.53 at the time of this
writing. But you don't need it, the included 'plplot_octave.cc' is the
result of running matwrap on 'plplot.h'. See the Makefile.

You might have some warnings. These are normal.

Now, you are finally ready to build what you really want, plplot support
under octave. You have a Makefile, but it is mainly for my use.

# double precision library with tk support
# The  -lsocket -lm libraries might not be needed in your system

mkoctfile plplot_octave.cc -lplplotdtk -lMatrix \
 -ltk4.2 -ltcl7.6 -lX11 -lsocket -lm

Or, just 'make'.

Now, make shure that the current directory is in octave loadpath,
*before* the standard loadpath, and
 
$ octave
Octave, version 2.0.10 (i586-pc-sco3.2v5.0.4).
Copyright (C) 1996, 1997, 1998 John W. Eaton.
This is free software with ABSOLUTELY NO WARRANTY.
For details, type `warranty'.

octave:1> LOADPATH
LOADPATH = .//:/usr/local/share/octave/2.0.11/m//

octave:2> plplot_octave_demo

demo x14c might fail, if you have problems with tk.

octave:3> for i=[1:9 11:14 19:20]; feval(sprintf("p%d",i));kbhit;endfor;oneplot

you can also try in octave:

grid
legend("on",1,0.1)
x=0:0.1:2*pi;y=sin(3*x).+cos(2*x);polar(x,y)

grid
legend("on",0.5,1)
[x y z]=rosenbrock ;z=log(z);
contour(x,y,z)
axis([0.75 1.25 0.75 1.35])
hold
shade(x,y,z)
hold
shade(x,y,z,15,2)
plcolormap(pink)

axis;
mesh(x,y,z)

x=1:10;x1=rand(10,1);y=5*sin(x);y1=rand(10,1);
plot(x,y,'-o',[x' x1],[y' y1],'b~')
figure(1)
plot(x,y,'-o',[x' x1],[y' y1],'b~')
closefig
save_fig("psc","popo.ps")
sprintf("%s", plgver')

You can set some preferences in the file pldef.m

to install,

	cp -r PLplot <where you want it/PLplot>

As every program, the ones in this package are not finished nor bug free.
Please report bugs and send patches.

Enjoy,

Joao, jcardoso@inescn.pt
