| sn_layout | R Documentation |
Apply a layout algorithm to compute node positions.
sn_layout(network, layout, seed = 42, ...)
network |
A cograph_network object, matrix, data.frame, or igraph object. Matrices and other inputs are auto-converted. |
layout |
Layout algorithm name (see Details), a two-letter or full
igraph layout name, an igraph layout function, a |
seed |
Random seed for deterministic layouts. Default 42. Set NULL for random. |
... |
Additional arguments passed to the layout function. |
"spring"Force-directed layout (Fruchterman-Reingold).
"oval"/"ellipse"Nodes arranged around an ellipse.
"circle"Nodes arranged in a circle.
"groups"Circular layout with grouped nodes clustered together.
"grid"Nodes in a regular grid.
"random"Random positions.
"star"Central node with others arranged around it.
"bipartite"Two-column layout for bipartite networks.
"gephi"/"gephi_fr"Gephi-style force-directed layout.
Two-letter codes for igraph layouts: "kk" (Kamada-Kawai), "fr" (Fruchterman-Reingold), "drl", "mds", "ni" (nicely), "tr" (tree), "ci" (circle), etc.
igraph layout functions and full igraph layout names such as
"layout_with_kk" are also accepted.
The cograph_network with node coordinates in the x
and y columns of its node table.
cograph for network creation,
sn_nodes for node customization,
sn_edges for edge customization,
sn_theme for visual themes,
splot and soplot for plotting
cograph(regulation_net) |> sn_layout("circle") |> splot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.