Write a simple undirected graph to path in graph6 format.
Parameters: | G : Graph (undirected) path : file or string
nodes: list or iterable :
header: bool :
|
---|---|
Raises: | NetworkXError :
|
See also
Notes
The format does not support edge or node labels, parallel edges or self loops. If self loops are present they are silently ignored.
References
Graph6 specification: http://cs.anu.edu.au/~bdm/data/formats.txt for details.
Examples
>>> G = nx.Graph([(0, 1)])
>>> nx.write_graph6(G, 'test.g6')