[plt-scheme] Diagram Library

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Jan 8 20:54:14 EST 2010

On Jan  8, Karl Winterling wrote:
> I'd really like to see a pict library for drawing graphs (as in
> graph theory), commutative diagrams (i.e., labeled digraphs),
> etc. Does anything like this exist on PLaneT? It seems somewhat
> challenging to write something like this that optimizes edge and
> vertex placement for reading.

If you want something that works really well, the best way to go would
be to write an interface around graphviz.  It shouldn't be too hard,
since it is designed to be used by other applications so you don't
even need to write foreign glue code -- for example, the default mode
is to read a graph description and output an annotated description
with placement for the nodes.  (Redex uses this.)  It would be very
hard to beat that in terms of options and different layout algorithms.

In addition, it would be nice to have some pure scheme code so it can
run with no external dependencies -- I have a very rough beginning of
a graph layout code that I was playing with to render the profiler
results, but I got stuck on various details and never finished it.  It
would be great if anyone knows how to write such algorithms and can
contribute some work to finish this thing.

(But if you need to do some "real work" with graphs, then graphviz is
really the way to go, IMO.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.