nocad.plotting.default_layout#
- nocad.plotting.default_layout(adj, random_state=0, scale=1.0, method='auto')[source]#
Node positions for a network drawing.
- Parameters:
- adj
network - random_state
int Seed of the spring layout.
- scale
float Half-width of the bounding box of the result.
- method
str, default=”auto” "auto"(Kamada–Kawai up to 80 nodes, spring above, disconnected parts side by side); a NetworkX layout ("kamada_kawai","spring","spectral","circular","shell");"multipartite"(NetworkX multipartite layout with the levels of the SCC hierarchy as layers);"hierarchy"and"observation_hierarchy"(nocad.viz.hierarchy_layout())."default"is an alias of"auto".
- adj
- Returns:
- pos
ndarrayofshape(N, 2);as_pos_dict()turnsitintoaNetworkXpos.
- pos