source: trunk/Jgraph/complex-examples/README @ 419

Last change on this file since 419 was 419, checked in by Nicholas Riley, 12 years ago

Jgraph: Debian changes by pzn@…

File size: 2.8 KB
Line 
1This directory contains a few examples of using jgraph to draw figures.
2They range from relatively simple to quite complex.
3
4I can't claim that jgraph is a better way to draw pictures than normal
5WYSIWYG editors like MacDraw or xfig or idraw.  However, it has a few
6advantages.  First, because of jgraph's string justification and rotation
7commands, jgraph plots text more reliably than other tools.  Since you
8must specify exact points with jgraph, arrows are guaranteed to go to
9the right places and so on.  Although it's more cumbersome, it is also
10more precise.
11
12Second, because jgraph is essentially a programming language, it makes
13it easier to use tools like awk and nawk and sed to draw pictures which
14have iterative structure.  This is a failing of most WYSIWYG editors.
15Drawing a picture like those in tree.awk would be quite difficult and
16tedious in your standard WYSIWYG editor.
17
18The files are: from simplest to most complex:
19
20
21
22---- Straight jgraph files
23
24mlti.jgr -- A graph plotting a simple multicomputer incterconnection
25timeline.jgr -- A graph plotting a time line of three computers
26                sending messages to one another
27wedmap.jgr -- A map made with jgraph
28
29
30
31---- Jgraph mixed with awk/nawk/sh
32
33tree.awk -- This is an nawk file which will create a jgraph for any
34            m-level n-ary tree, where m and n are specified in the
35            command line arguments
36
37grtoj.sh -- This is a shell script mixed with nawk written by Adam
38            Buchsbaum at Princeton which is a jgraph preprocessor
39            for drawing graphs (the kind with nodes and edges, not
40            the kind with points and hash marks).  He hasn't written
41            up a man page for it, but you can see how much of it works
42            with the example file grex.gtj.
43
44diskarray.jgr -- This is a jgraph file which shows a very neat mixture
45                 of jgraph and awk.  First, there is the file convert.awk,
46                 which takes a jgraph file, and converts it into an awk
47                 file.  This awk file takes as input a pair of x and y
48                 coordinates on the command line arguments, and then
49                 produces the jgraph to plot the original jgraph file
50                 at those coordinates in the new jgraph file.  In this
51                 file, disk.jgr is plotted 6 times to make a disk array.
52
53ckpov.jgr -- This is a similar jgraph file, which uses the more complex
54             file srm.jgr, depicting a computer screen to make a nice
55             picture.
56
57seq.jgr
58conc.jgr
59cow.jgr
60cll.jgr
61alg.jgr -- These are all files which comprise alg.jgr.  Note that
62           they are standalone pictures.  Alg.jgr simply plots all
63           of them together.  Thus they show a neat way that jgraph
64           makes it easy to not duplicate work when duplicating pictures.
65
Note: See TracBrowser for help on using the repository browser.