File: README

package info (click to toggle)
jgraph 83-20
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 628 kB
  • ctags: 445
  • sloc: ansic: 4,728; makefile: 186; sh: 106; awk: 104
file content (65 lines) | stat: -rw-r--r-- 2,834 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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.