DOT#

The DOT graph description language defines a file format that is most often used in the context of graph visualization with Graphviz. NetworkX provides an interface to Graphviz via pygraphviz, implemented in nx_agraph. If pygraphviz is installed, nx_agraph can be used to read and write files in DOT format.

pygraphviz#

read_dot(path)

Returns a NetworkX graph from a dot file on path.

write_dot(G, path)

Write NetworkX graph G to Graphviz dot format on path.