반응형

networkx - Graph Layout

 

Graph Layout

Node positioning algorithms for graph drawing.

For random_layout() the possible resulting shape is a square of side [0, scale] (default: [0, 1]) Changing center shifts the layout by that amount.

For the other layout routines, the extent is [center - scale, center + scale] (default: [-1, 1]).

Warning: Most layout routines have only been tested in 2-dimensions.

bipartite_layout(G, nodes[, align, scale, ...]) Position nodes in two straight lines.
circular_layout(G[, scale, center, dim]) Position nodes on a circle.
kamada_kawai_layout(G[, dist, pos, weight, ...]) Position nodes using Kamada-Kawai path-length cost-function.
planar_layout(G[, scale, center, dim]) Position nodes without edge intersections.
random_layout(G[, center, dim, seed]) Position nodes uniformly at random in the unit square.
rescale_layout(pos[, scale]) Returns scaled position array to (-scale, scale) in all axes.
rescale_layout_dict(pos[, scale]) Return a dictionary of scaled positions keyed by node
shell_layout(G[, nlist, rotate, scale, ...]) Position nodes in concentric circles.
spring_layout(G[, k, pos, fixed, ...]) Position nodes using Fruchterman-Reingold force-directed algorithm.
spectral_layout(G[, weight, scale, center, dim]) Position nodes using the eigenvectors of the graph Laplacian.
spiral_layout(G[, scale, center, dim, ...]) Position nodes in a spiral layout.
multipartite_layout(G[, subset_key, align, ...]) Position nodes in layers of straight lines.

 

https://networkx.org/documentation/latest/reference/drawing.html#module-networkx.drawing.layout

 

Drawing — NetworkX 2.7rc1.dev0 documentation

Drawing NetworkX provides basic functionality for visualizing graphs, but its main goal is to enable graph analysis rather than perform graph visualization. In the future, graph visualization functionality may be removed from NetworkX or only available as

networkx.org

반응형

+ Recent posts