Re: Best editor for drawing directed graphs
On Wed, Feb 02, 2005 at 06:36:16AM -0800, jlk wrote:
> I'm looking of a good interactive editor for drawing directed graphs.
> What package would you recommend?
I wrote one in python/tk a while ago, it's not complete but may be of
interest if not much use. I am working on a new version of it in b (my
pythonesque C dialect). It doesn't do automatic layout yet.
I have posted the python version at http://nipl.net/hacks, it needs
command_entry.py and graph.py (and the python-tk package). Although
this program leaves much to be desired, I was able to use it to map
(some of) the old game "adventure", my maps are in that directory too
(map1 .. map4).
The user-interface is a bit weird, I have redesigned it in the new
version. It's modal: starts off in "add" mode, you can add notes and
arcs, and bend the arcs, and scroll the screen in that mode. You can
change mode by typing what mode you want (or first letter) in the
command entry line and pressing enter. These are the modes:
a - add
add nodes and arcs
m - move
to move the nodes and bend the arcs
d - delete
click to destroy things
n - name
type a name, then click on a node or arc to label it, you can remove
z - zoom
this is a really weird mode, you have to click once to select a
centre, then drag to zoom or rotate! next time you click, it selects
a new centre. I improved this a lot in the C version!
s - size
resize nodes (they're all circles for the moment)
There are also some non-mode commands:
w - write
enter `w foo' to save the graph in file foo
r - read
enter `r foo' to read a graph from file foo
c - clear
enter `c' to clear the graph
The C version interface is better, it uses all three mouse buttons, but
it's not finished.
This program needs a "group" feature, too (nodes within nodes, maybe).