prog/lib to draw graphs
Florian Lindner
Florian.Lindner at xgm.de
Thu Jan 22 08:15:50 EST 2004
netnews.upenn.edu wrote:
> 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 |
>> \--------/ \--------/
>>
>> 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
>
> Try graphviz:
>
> http://www.research.att.com/sw/tools/graphviz/
>
>
> 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
> something like:
>
> digraph G{
> "Node A" -> "Node B" [label="belongs to"];
> }
Thanks! (to all)
Does GraphViz also support the automated optimal placement of nodes? I'll
have many nodes...
Thx,
Florian
More information about the Python-list
mailing list