Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 335 Bytes

examples.rst

File metadata and controls

17 lines (14 loc) · 335 Bytes

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

See more simple and complicated examples.