PyGraphviz

This documentation is for version 1.0.dev1780, which is not released yet.

Download

This documentation is for version 1.0.dev1780, which is not released yet.

You can check it out from Subversion or look for released versions in the Python Package Index.

Questions? Suggestions?

Join the Google group:

You can also open an issue at the on the developer's site.

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.

Quick Example

>>> 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")

Documentation

Get PyGraphviz

PyGraphviz is available as an easy-installable package on the Python Package Index.

The code can be found on the NetworkX SVN server at http://networkx.lanl.gov/svn/pygraphviz/trunk.