CLIM mail archive


Formatting graphs.

    Date: Wed, 8 Jan 1992 03:03 EST
    From: chee@ISI.EDU


    Got a couple of questions about the graphing functions in CLIM.
    o Is the current FORMATING-GRAPH-FROM-ROOT incapable of graphing
      lattice?  Eg., in the provided eg., can the function produce a 
      graph of the form;
	  /    \
	0<      >2B 
	  \    /

CLIM 1.0 is not capable of graphing DAGs, only trees.  I recently
installed into CLIM 1.0 a new grapher based on some earlier work by John
Aspinall that handles both trees and DAGs.  It detects circularities to
the extent that it does not go into an infinite loop, but does not
correctly graph them.

    o What new functionality will be available in CLIM 2.0?  I would like
      the functionality that came with Dynamic windows, ie., access to
      functions to control how edges are drawn (eg., dotted lines, using
      CONNECT-GRAPH-NODE (?)), different topology, etc.  Any chance of
      making the edges mouse sensitive?

The new grapher takes both :ARC-DRAWER and :ARC-DRAWING-OPTIONS
keywords.  The default arc drawer is effectively CLIM:DRAW-LINE*.  You
would specify :ARC-DRAWING-OPTIONS '(:DASHES T) to get a dashed arc.
You can specify your own arc drawer that uses WITH-OUTPUT-AS-PRESENTATION
to make the arcs mouse-sensitive.

Another new option is :GRAPH-TYPE, which allows you to specify what kind
of graph should be drawn.  The new grapher supports :TREE (which is what
the old grapher does), and :DIRECTED-GRAPH (or :DIGRAPH) and
:DIRECTED-ACYCLIC-GRAPH (or :DAG).  Currently :DIGRAPH and :DAG do the
same thing.

I think that the way the new grapher is designed obviates the need for
an explicit CONNECT-GRAPH-NODE function.  I have ported all of the
previous programs I know of that use CONNECT-GRAPH-NODE to CLIM, and
have not needed it yet.

This new grapher will be part of CLIM 2.0, but will probably be no more
sophisticated than I have described.  For such high-level utilities as
this, we feel that it is better to provide simple facilities that can be
extended.  The draft CLIM 2.0 spec exposes the graph formatting
protocols so that you can extend the grapher to use your own layout

Main Index | Thread Index