view_pygraphviz(G, edgelabel=None, prog='dot', args='', suffix='', path=None, show=True)
If this function is called in succession too quickly, sometimes the image is not displayed. So you might consider time.sleep(.5) between calls if you experience problems.
The machine to draw.
If a string, then it specifes the edge attribute to be displayed on the edge labels. If a callable, then it is called for each edge and it should return the string to be displayed on the edges. The function signature of :None:None:`edgelabel`
should be edgelabel(data), where :None:None:`data`
is the edge attribute dictionary.
Name of Graphviz layout program.
Additional arguments to pass to the Graphviz layout program.
If :None:None:`filename`
is None, we save to a temporary file. The value of :None:None:`suffix`
will appear at the tail end of the temporary filename.
The filename used to save the image. If None, save to a temporary file. File formats are the same as those from pygraphviz.agraph.draw.
Whether to display the graph with PIL.Image.show
, default is :None:None:`True`
. If :None:None:`False`
, the rendered graph is still available at :None:None:`path`
.
The filename of the generated image.
The PyGraphviz graph instance used to generate the image.
Views the graph G using the specified layout algorithm.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them