circular_layout(G, dim=2, scale=1.0, center=None)¶
Position nodes on a circle.
- G (NetworkX graph or list of nodes) –
- dim (int) – Dimension of layout, currently only dim=2 is supported
- scale (float (default 1)) – Scale factor for positions, i.e. radius of circle.
- center (array-like (default origin)) – Coordinate around which to center the layout.
A dictionary of positions keyed by node
>>> G=nx.path_graph(4) >>> pos=nx.circular_layout(G)
This algorithm currently only works in two dimensions and does not try to minimize edge crossings.