read_dot¶
- read_dot(path)[source]¶
Returns a NetworkX
MultiGraph
orMultiDiGraph
from the dot file with the passed path.If this file contains multiple graphs, only the first such graph is returned. All graphs _except_ the first are silently ignored.
- Parameters
- pathstr or file
Filename or file handle.
- Returns
- GMultiGraph or MultiDiGraph
A
MultiGraph
orMultiDiGraph
.
Notes
Use
G = nx.Graph(read_dot(path))
to return aGraph
instead of aMultiGraph
.