Update:  This version works fine with PGPLOT 5.0.3. Also I improved 
this readme file (expecially the instructions) and renamed it to match 
the naming convention for readme files in the pgplot distribution.  
    John S. Salmento 1/1996.

I have finally ported PGPLOT 5.0.2 to the mac using Language System Fortran 
2.1.  The mac window driver currently supports 8 colors, cursor, rectangle 
and polygon fills, and primitive pixel support (not tested yet), and pen 
thickness support.  No hardware dashed lines, color query support, hardware 
symbol support.  I plan to make improvements as time goes by.  I have also 
ported the postscript, null, HPGL plotter, HPGL2 (not tested yet), HP7221, 
Latex (not tested yet), and Metafile (not tested yet).
 
I create a MPW script that automatically creates the makefile.  I also 
created two fortran programs: the first automatically creates the grexec.f 
file from the drivers.list file, the second creates pgplot.doc and 
pgplot.html.  Both of these programs are written using the F77 standard, 
except for a few Language System extensions.  So these programs can be 
easily modified to run on other machines.

Finally, I'm not a programmer so if you find any bugs, inconsistencies, 
suggestions, and especially re-written, new and improved subroutines send 
them to me.  I'm a Ph.D.  student trying to finish and looking for work, so 
I'm not able to support of this project.  If someone else wants to take 
over support than please do.  I would like to receive any modifications or 
improvements so that I can update this port when I have time or at least
distribute the modifications as separate files.

Cristy (cristy@udel.edu) has taken this port of PGPLOT 5.0.2 and got it 
working in 68000 mode on a PowerPC.  I have incorporated her changes into 
this release.  Mike Burnett (mnb@ornl.gov) has gotten this port to work in 
native mode on a PPC.  I have not incorporated his modifications so see the 
file ppcnative.version for more instructions.  Rob Managan 
(managan@llnl.gov) is creating a version of PGPLOT to work with Absoft 
MacFortran.  He sent me instructions for changing the cursor to cross-hairs 
which I have not implemented, see the file crosshairs.txt for more details.

Cristy and Mike Burnett are not available for support although if they have
time they may be able to answer a few questions.

Installation Instructions for the Mac Driver for PGPLOT 5.0.2 using LS 
FORTRAN 2.1.

1.  Get and install pgplot from http://astro.caltech.edu/~tjp/pgplot/.  
Pgplot, as of version 5.0.3, contains an older version of the mac driver in 
the sys_mac folder.

2.  Put sys_mac from this archive into the pgplot folder, overwriting any 
existing sys_mac folder.

3.  Copy macmake, pgplot.make, buildpgplot, and drivers.list into the 
pgplot folder.

4.  Modify drivers.list in the pgplot folder to include or exclude the 
drivers you want.

5.  Copy pgplot.inc and grpckg1.inc from the src folder into the pgplot 
folder.

6.  In :sys_mac: modify the comment lines at the top of mcdriv.f, gruser.f, 
grgmem.f.

This version of pgplot.make compiles driver files that are placed in the 
:sys_mac: folder, so there is no need to copy mcdriv.f to the :drivers: 
folder.

Macmake is a MPW script to create the pgplot.make file.  It takes 
approximately 15 minutes on my 33MHz 68030 PB165c.  So if you may want to 
modify pgplot.make directly if you want to make small changes like change 
the compiler settings or add a new driver file.  Buildpgplot is a MPW 
script which accepts one of the targets defined in pgplot.make such as all, 
pgplot.lib, grfont.dat, demos, etc.

If you want to create a new pgplot.make, edit the driver.list file in the 
pgplot folder to mark the drivers that you want to compile.  Set the 
current directory inside of MPW to the pgplot folder.  Type "macmake" in 
the worksheet window.  After creating the new pgplot.make file, I would 
modify it to remove the saveall compiler option for mcdriv.f.  I don't 
believe it is needed and it reduces the amount of memory needed to run the 
demo programs.

To build the pgplot.lib library file for the first time, create pgplot.make 
with macmake or modify the existing pgplot.make file.  Then type 
"buildpgplot all".  This will create the pgplot.lib, grfont.dat, grexec.f, 
all the demostration programs.

To create the documentation, type "buildpgplot doc".  This creates the 
files pgplot.doc and pgplot.html.

To remove all the *.f.o files, type "buildpgplot clean".  Note: this does 
not remove the *.f.o files in the examples folder.  I will fix that in the 
near future.

Comments: 

The mac device is Interactive, Cursor Control, No Hardware dashed lines, 
Arbitary Polygons Fills, Pen Thickness support but ends are not rounded, 
Rectangle Fills, Pixel Primitives Support, No Extra Prompt before closing 
window, No color query support, No hardware symbol.  Also only 8 colors are 
supported, I haven't figured out how to use ColorQuickdraw.

Unix environment names are replaced with a file called pgplotenvnames.  
This file contains a list of the environment names and their settings.  It 
should be placed in the same folder as the folder you are running your 
fortran program from.  So if you are executing one of the examples in 
:pgplot:examples:, then put pgplotenvnames into that folder.  If the 
library can't find it, then a dialog box will come up asking you to find 
it.

Only one macwindow at a time can be supported currently.  If you want the 
window to remain updated you need to set the environment variable 
MACPICTURE to ON in the pgplotenvnames files.  Window updating is 
accomplished by recording everything written to the screen in a QuickDraw 
picture and then setting the WindowPic to the picture handle.  This way the 
mac OS will handle updating the picture whenever it needs to be done.  It 
is not fast but it makes programming windowing updating very easy.  An 
interesting side effect occurs when the animation is used such as in 
pgdemo11.  After the traveling sine wave is completed and you switch to 
another application or window which partially covers the sine wave window, 
when you switch back the region which was covered will be re-written 
starting from the beginning (which can take awhile).  So a crude control is 
to turn-off picture recording in the pgplotenvnames files and turn it on 
again when you want it.  Also the window will not update during interactive 
mode until the entire picture is finished.

I haven't written any code to save the picture to a "PICT" file or to send 
it to a printer.

I tried to get OPCODE 26 working, but I'm not sure if any of the example 
programs use it so I don't know if it works.

Libraries files in LS Fortran 2.1 seem to be flakely.  So it would be nice 
to see if combining all the pgplot files into a single file and recompiling 
would make it more robust.  For examples, I haven't gotten pgplot.lib to 
work correctly with all of the example programs when I compile it with the 
mc68881 option.

Need to modify grgenv.f so that pgplotenvnames can be placed in preference 
folder.  (Mike Burnett has modified pgplotenvnames to look in the 
preferences folder, but I haven't tested it yet.  It is included as 
newgrgenv.f.  Rename it to grgenv.f and re-build pgplot.lib to use it.)


Current problems with demo programs.

The arrows don't appear using Pgconx in pgdemo3 and contouring on a 
non-cartesian grid is very slow.

2nd example in pgdemo5 needs more colors.

pgdemo6 uexpectedly quits when I hit return to close the mac window.

pgdemo9 needs more colors before it will work.

Last bits of advise. 

Try adjusting the compiler options if things don't work correctly.  If the 
examples or other programs die or crash try increasing the memory 
partition.  If you are getting undeclared toolbox functions or variables 
then check to see if the file toolbox file in :interfaces:fincludes: is 
similiar to the toolbox file in :sys_mac: The toolbox file in :sys_mac: is 
not used, I included to show you what my toolbox file looks like.  See your 
LS fortran manual for more details about the toolbox file.

Good luck

John Salmento
js0p@lehigh.edu
http://www.lehigh.edu/~js0p/js0p.html (web page for pgplot for mac).
(610) 758-6285

