plot.multiplex: Plotting layers of a multiplex network

Description Usage Arguments Value See Also Examples

Description

This function allows to have a visual approach to the network, according to the number of layers the user wants to display. The function plots a single, interactive graph is just one layer is selected, using simpleNetwork function, or a sequence of graphs if >1 layers are selected, using plot.igraph method. All graphs are easily exportable using RStudio buttons.

Usage

1
  plot(obj, index, ...)

Arguments

obj

An object of class multiplex.

index

A vector of IDs (or labels) for the selected layers on which to display the graph.

...

This argument allows to input any other option belonging to plot.igraph or simpleNetwork methods.

Value

If interactive == TRUE and length(index) == 1, then an interactive graph for the selected layer is displayed in the Viewer pane. If interactive == FALSE, a sequence of graphs are displayed in the Plot pane, browsable with the 'Enter' key.

See Also

create.multiplex, plot.igraph, simpleNetwork

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Loading Aarhus CS Department dataset.

data(aarhus_mplex)

# Creating the multiplex object using the dataset loaded into aarhus_mplex object.

mplexObj <- create.multiplex(nodes = aarhus_mplex$nodes,
                            layersNames = aarhus_mplex$layerNames,
                            layer1 = aarhus_mplex$L1,
                            type1 = "undirected",
                            aarhus_mplex$L2,
                            aarhus_mplex$L3,
                            aarhus_mplex$L4,
                            aarhus_mplex$L5
                            )

# Visualize the interactive graph for the "facebook" layer:

plot(mplexObj, index = 2, interactive = TRUE)

# Visualize the sequence of graphs for the "coauthor" and "leisure" layers:

plot(mplexObj, index = c(3, 4))

Achab94/mplex documentation built on May 5, 2019, 11:46 a.m.