powered by
Register a new layout algorithm that can be used for network visualization.
register_layout(name, layout_fn)
Invisible NULL.
Character. Name of the layout.
Function. A function that computes node positions. Should accept a CographNetwork object and return a matrix with x, y columns.
# Register a simple random layout register_layout("random", function(network, ...) { n <- network$n_nodes cbind(x = runif(n), y = runif(n)) })
Run the code above in your browser using DataLab