Layout: Layouts

multinet.layoutR Documentation

Layouts

Description

These functions compute xyz coordinates for each node in the network.

Usage

layout_multiforce_ml(n, w_in = 1, w_inter = 1, gravity = 0, iterations = 100)
layout_circular_ml(n)

Arguments

n

A multilayer network.

w_in

An array with weights for intralayer forces, or a single number if weights are the same for all layers. When w_in is positive, vertices in the corresponding layer will be positioned as if a force was applied to them, repelling vertices that are close to each other and attracting adjacent vertices, all proportional to the specified weight.

w_inter

An array with weights for interlayer forces, or a single number if weights are the same for all layers. When w_inter is positive, vertices in the corresponding layer will be positioned as if a force was applied to them, trying to keep them aligned with the vertices corresponding to the same actors on other layers, proportionally to the specified weight.

gravity

An array with weights for gravity forces, or a single number if weights are the same for all layers. This parameter results in the application of a force to the vertices, directed toward the center of the plot. It can be useful when there there are multiple components, so that they do not drift away from each other because of the repulsion force applied to their vertices.

iterations

Number of iterations.

Value

These functions return a data frame with columns: actor, layer, x, y, z. Each value of z corresponds to one layer, and x and y are the coordinates of the actor inside that layer.

References

Fatemi, Zahra, Salehi, Mostafa, & Magnani, Matteo (2018). A generalised force-based layout for multiplex sociograms. Social Informatics

See Also

multinet.plotting

Examples

net <- ml_florentine()
layout_multiforce_ml(net)
l <- layout_circular_ml(net)
## Not run: 
plot(net,layout=l)
## End(Not run)

multinet documentation built on Feb. 16, 2023, 10:57 p.m.