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)

从路径上的dot文件返回一个NetworkX图。

write_dot(G, path)

将NetworkX图G写入路径上的Graphviz dot格式文件。