PyGraphviz is a Python interface to the Graphviz graph layout and visualization package. With PyGraphviz you can create, edit, read, write, and draw graphs using Python to access the Graphviz graph data structure and layout algorithms. PyGraphviz is independent from NetworkX but provides a similar programming interface.
>>> import pygraphviz as pgv >>> G=pgv.AGraph() >>> G.add_node('a') >>> G.add_edge('b','c') >>> G strict graph { a; b -- c; } To load a dot file use >>> G=pgv.AGraph("file.dot") |
Tutorial Reference Examples |
Contents Search Page General Index Module Index |
Download PyGraphviz from the Python Package Index.
The code source code is available from the NetworkX SVN server at http://networkx.lanl.gov/svn/pygraphviz/trunk.