layout_multilevel: Layout for multilevel networks

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/layout_multilevel.R

Description

Set layout coordinates for multilevel networks from a chosen algorithm

Usage

1
layout_multilevel(x, layout = igraph::layout_with_fr)

Arguments

x

a graph object. Must be a multilevel network.

layout

The chosen layout algorithm. A function layout of the 'igraph' package without parentheses. Default set to 'Fruchterman-Reingold'.

Details

In order to facilitate the visualization of multilevel networks, higher level nodes are set in the upper part of the plane and the lower level nodes are set in the lower part of the plane.

Value

A two- or three-column matrix, each row giving the coordinates of a vertex, according to the ids of the vertex ids.

Author(s)

Neylson Crepalde, neylsoncrepalde@gmail.com

See Also

layout_

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Check if the network is multilevel
is_multilevel(linked_sim)

# Generate the layout (x,y) coordinates
l <- layout_multilevel(linked_sim)

# Plot the graph using the layout
plot(linked_sim, layout = l)

# Using Kamada Kawai algorithm
l.kk <- layout_multilevel(linked_sim, layout = igraph::layout_with_kk)

# Plot the graph with the new layout
plot(linked_sim, layout = l.kk)

neylsoncrepalde/multinets documentation built on Dec. 17, 2019, 11:46 p.m.