Python Language PyDotPlus


PyDotPlus is an improved version of the old pydot project that provides a Python Interface to Graphviz’s Dot language.


For the latest stable version:

pip install pydotplus

For the development version:

pip install
Load graph as defined by a DOT file
  • The file is assumed to be in DOT format. It will be loaded, parsed and a Dot class will be returned, representing the graph. For example,a simple

digraph demo1{ a -> b -> c; c ->a; }

import pydotplus
graph_a = pydotplus.graph_from_dot_file('')
graph_a.write_svg('test.svg') # generate graph in svg.

You will get a svg(Scalable Vector Graphics) like this:

enter image description here