NetworkX

Previous topic

networkx.from_pydot

Next topic

networkx.write_dot

Quick search

networkx.to_pydot

to_pydot(N, graph_attr=None, node_attr=None, edge_attr=None, strict=True)

Return a pydot graph from a NetworkX graph N.

If N is a Graph or DiGraph, graphviz attributes can be supplied through the keyword arguments

graph_attr: dictionary with default attributes for graph, nodes, and edges
keyed by ‘graph’, ‘node’, and ‘edge’ to attribute dictionaries

node_attr: dictionary keyed by node to node attribute dictionary

edge_attr: dictionary keyed by edge tuple to edge attribute dictionary

If N is an XGraph or XDiGraph an attempt will be made first to copy properties attached to the graph (see from_pydot) and then updated with the calling arguments, if any.