- zephyr_layout(G, scale=1.0, center=None, dim=2)¶
Positions the nodes of graph G in a Zephyr topology.
NumPy is required for this function.
G (NetworkX graph) – A Zephyr graph or a subgraph of a Zephyr graph, as produced by the
scale (float (default 1.)) – Scale factor. A setting of
scale = 1fits all positions within [0, 1] on the x-axis and [-1, 0] on the y-axis.
center (None or array (default None)) – Coordinates of the top left corner.
dim (int (default 2)) – Number of dimensions. When dim > 2, all extra dimensions are set to 0.
pos – Positions as a dictionary keyed by node.
- Return type
This example gives the positions of a Zephyr lattice of size 2.
>>> G = dnx.zephyr_graph(2) >>> pos = dnx.zephyr_layout(G)