This directory contains a few examples of using jgraph to draw figures.
They range from relatively simple to quite complex.

I can't claim that jgraph is a better way to draw pictures than normal
WYSIWYG editors like MacDraw or xfig or idraw.  However, it has a few
advantages.  First, because of jgraph's string justification and rotation
commands, jgraph plots text more reliably than other tools.  Since you
must specify exact points with jgraph, arrows are guaranteed to go to
the right places and so on.  Although it's more cumbersome, it is also
more precise.

Second, because jgraph is essentially a programming language, it makes
it easier to use tools like awk and nawk and sed to draw pictures which
have iterative structure.  This is a failing of most WYSIWYG editors.
Drawing a picture like those in tree.awk would be quite difficult and
tedious in your standard WYSIWYG editor.

The files are: from simplest to most complex:



---- Straight jgraph files

mlti.jgr -- A graph plotting a simple multicomputer incterconnection
timeline.jgr -- A graph plotting a time line of three computers
                sending messages to one another
wedmap.jgr -- A map made with jgraph



---- Jgraph mixed with awk/nawk/sh

tree.awk -- This is an nawk file which will create a jgraph for any
            m-level n-ary tree, where m and n are specified in the
            command line arguments

grtoj.sh -- This is a shell script mixed with nawk written by Adam 
            Buchsbaum at Princeton which is a jgraph preprocessor
            for drawing graphs (the kind with nodes and edges, not
            the kind with points and hash marks).  He hasn't written
            up a man page for it, but you can see how much of it works
            with the example file grex.gtj.

diskarray.jgr -- This is a jgraph file which shows a very neat mixture
                 of jgraph and awk.  First, there is the file convert.awk,
                 which takes a jgraph file, and converts it into an awk
                 file.  This awk file takes as input a pair of x and y 
                 coordinates on the command line arguments, and then 
                 produces the jgraph to plot the original jgraph file 
                 at those coordinates in the new jgraph file.  In this
                 file, disk.jgr is plotted 6 times to make a disk array.

ckpov.jgr -- This is a similar jgraph file, which uses the more complex
             file srm.jgr, depicting a computer screen to make a nice
             picture.

seq.jgr
conc.jgr
cow.jgr
cll.jgr 
alg.jgr -- These are all files which comprise alg.jgr.  Note that
           they are standalone pictures.  Alg.jgr simply plots all
           of them together.  Thus they show a neat way that jgraph
           makes it easy to not duplicate work when duplicating pictures.

