This directory contains the necessary files for linking PGPLOT to octave
or matlab or tela.  While pgplot is probably not useful from matlab, it
is a good demonstration of what the wrapper generator can do.

Modify the makefile to specify the location of the pgplot libraries on
your system, and type "make octave" to make the octave version, "make
matlab" to make the matlab version, or "make tela" to make the tela
version.

I tested the makefile with both GNU make and Digital Unix make.  If your
make doesn't work, use GNU make.

PGPLOT is available from http://astro.caltech.edu/~tjp/pgplot/.  The
example here was built for version 5.2 of PGPLOT.  PGPLOT and cpgplot
need to be compiled either as a shared library, or else in a suitable
form for linking into a shared library.  On some systems, this means you
have to tell the compiler to produce position-independent code (-fPIC
option to gcc).  Check the documentation for producing shared libraries
on your system.

Currently, I have only been able to test this myself on a DEC alpha
running Digital Unix 4.0.  I'd appreciate comments on whatever tweaks
you had to make to the compilation process to get this to work.  Send me
your operating system version, any special steps in compiling pgplot,
what fortran/C/C++ compilers you used in compiling pgplot and octave,
what libraries you had to specify, and any other details.  Send to
holt@klab.caltech.edu.

Octave notes:

  If the file mkoctfile is not in your path, you'll need to modify the
  Makefile.  Add "-mkoctfile /where/you/put/mkoctfile" to the end of the
  line beginning "MKOCTFILE=".

  To run the demo, you must do the following:

	% make octave
	% setenv PGPLOT_DIR /where/you/put/pgplot
	% octave
	octave:1> pgplot_stub
	octave:2> pgopen('/xserv')
	octave:3> pgdemo4_for_octave

   Depending on how you compiled pgplot, you may need to use '/XWINDOW'
   instead of '/XSERV'.  Type 'pgldev' for a list of available devices.

   This example will fail if you run octave in -braindead (matlab
   compatibility) mode, because of the setting of prefer_column_vectors.
   Just replace tr with its transpose if this is a problem.

MATLAB notes:

  To run the demo, you must do the following:

	% make matlab
	% setenv PGPLOT_DIR /where/you/put/pgplot
	% matlab
	>> path('wrap_m', path)
	>> pgopen('/xserv')
	>> pgdemo4_for_matlab

   Not all the pgplot subroutines work in matlab because we don't support
   char arrays properly.  This can be fixed if there is a good reason to
   do so.

   Depending on how you compiled pgplot, you may need to use '/XWINDOW'
   instead of '/XSERV'.  Type 'pgldev' for a list of available devices.

Tela notes:

   To run the demo, you must do the following:

	% make tela
	% setenv PGPLOT_DIR /where/you/put/pgplot
	% tela_pgplot
	> pgopen("/xserv")
	> source("pgdemo4_for_tela.t")

   Depending on how you compiled pgplot, you may need to use "/XWINDOW"
   instead of "/XSERV".  Type 'pgldev()' for a list of available devices.

The only input to the wrapper generator is the file "cpgplot.h", which
is a modified version of the file cpgplot.h that comes with the pgplot
distribution.  The only modifications that were made were to put in
directives telling matwrap where to put the array subscripts.
