Warning
This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.
shell_layout¶
-
shell_layout
(G, nlist=None, dim=2, scale=1, center=None)[source]¶ Position nodes in concentric circles.
Parameters: Returns: A dictionary of positions keyed by node
Return type: Examples
>>> G = nx.path_graph(4) >>> shells = [[0], [1,2,3]] >>> pos = nx.shell_layout(G, shells)
This algorithm currently only works in two dimensions and does not try to minimize edge crossings.