prog/lib to draw graphs

Bill Scherer Bill.Scherer at verizonwireless.com
Thu Jan 22 13:49:15 CET 2004


[P&M]

Florian Lindner wrote:

>Hello,
>I'm looking for a program or python library to draw graphs.
>They should look like the that:
>
>
>/--------\                         /--------\
>| Node A | ------ belongs to ----> | Node B |
>\--------/                         \--------/
>

Florian -

Graphviz (http://www.graphviz.org) is a great package for drawing 
graphs.  It ouputs to many formats.  There is a python lib for it at 
http://www.freshports.org/graphics/py-graphviz/, but I have not used 
it.  It's easy enough to generate dot[1] code and call dot to generate 
the graph image, so that's what I usually do.

HTH,

Bill


1. 'dot' is one of the graphviz commands.

>Which is a result of the function call like that:
>
>connectNodes(firstNode, secondNode, description, lineStyle)
>connectNodes("Node A", "Node B", "belongs to", dashed)
>
>It should have a open scalable vector format as output (DVI, SVG, PDF, ...)
>and should be able to make automatic optimal placement of the items.
>Do you know something like that?
>Thx,
>Florian
>  
>





More information about the Python-list mailing list