Question about drawing simple graph in Python?

Patrick Surry Patrick.Surry at quadstone.com
Fri Nov 8 09:28:18 EST 2002


I don't know of a specific module for this, but there's a nice package called
graphviz (google will find it, I'm offline) which includes tools for rendering
directed and undirected graph layouts to various formats (postscript, gif,
etc).  The nice thing about it is that you just need to generate a text file
with the topology in it, something like:

s1 -> t1;
s2 -> t2;
...

and then graphviz will figure out a nice layout for the graph.  The input file
should be really easy to generate from Python (I've done it from perl in the
past)

Patrick

-- 
_________________________________________________________________________
Patrick Surry, PhD  Tel 617 753 7393 Fax 617 457 5299   www.quadstone.com
- With the breadth of our knowledge grows the boundary of our ignorance -






More information about the Python-list mailing list