get_node_positions
Finds the (x,y)-coordinates of nodes on the basis of the specified layout and seed values.
Parameters
- g : SAS graph object
-
Specifies the graph to plot.
- layout : str
-
Specifies the algorithm to compute the node positions. The default is ‘kamada_kawai’. The following layouts are supported: ‘bipartite’, ‘circo’, ‘circular’, ‘dot’, ‘fdp’, ‘fruchterman_reingold’, ‘kamada_kawai’, ‘multipartite’, ‘neato’, ‘planar’, ‘random’, ‘sfdp’, ‘shell’, ‘spectral’, ‘spiral’, ‘spring’, and ‘twopi’. The ‘circo’, ‘dot’, ‘fdp’, ‘neato’, ‘sfdp’, and ‘twopi’ layouts require Graphviz and pydot to be installed.
- seed : int
-
Specifies the seed for reproducibility in random layouts.
- scale_factor : float, optional
-
Specifies the scale factor for positions.
Returns
- dict of arrays
-
Returns the x- and y-coordinates of each node.