prog/lib to draw graphs
p.magwene at snet.net
Thu Jan 22 13:48:27 CET 2004
Florian Lindner wrote:
> I'm looking for a program or python library to draw graphs.
> They should look like the that:
> /--------\ /--------\
> | Node A | ------ belongs to ----> | Node B |
> \--------/ \--------/
> 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?
I think there's a python interface to graphviz floating around (Google
it), but it's trivial to write a Python routine that spits out valid
Graphviz "dot" files.
In the case of your example, the contents of the dot file would be
"Node A" -> "Node B" [label="belongs to"];
More information about the Python-list