Learn R Programming

multigraph (version 1.0)

mlgraph: Multilevel Graph

Description

A function to create and manipulate multilevel graphs.

Usage

mlgraph(net, layout = c("circ", "force", "stress", "rand", "conc", "bip"), main = NULL, 
        seed = NULL, maxiter = 100, directed = TRUE, alpha = c(1, 1, 1), scope, collRecip, 
        lbs, showLbs, showAtts, cex.main, col.main, font.main, coord, clu, cex, lwd, pch, 
        lty, bwd, bwd2, att, bg, mar, pos, asp, ecol, vcol, vcol0, col, lbat, loops, rot, 
        mirrorX, mirrorY, mirrorD, mirrorL, mirrorV, mirrorH, hds, scl, vedist, vldist, 
        flip, ffamily, fstyle, fsize, fcol, valued, modes, elv, lng, nr, new, jitter, ...)

Value

A plot of the multilevel graph structure for the network.

Arguments

net

A “Multilevel” class object or a 3D array with clustering information.

layout

Visualization layout:

  • circ Circular

  • force Force-directed

  • stress Stress-majorization

  • rand Random

  • conc Concentric

  • bip Bipartite graph

main

(optional) Main title of the plot graph.

seed

(optional, for force, stress and rand) Random seed number for initial coordinates of vertices.

maxiter

(optional when seed) Maximum number of iterations.

directed

(logical) Are graph edges in domain directed?

alpha

Vector with the alpha colour transparencies for (vertex, edge, bg).

scope

(optional) Scope of graph, edges, and vertices.

collRecip

(optional, logical and experimental) Collapse reciprocated edges in graph domain?

lbs

(optional) List of customized vertex labels for domain and codomain.

showLbs

(optional and logical) Display vertex labels in graph?

showAtts

(optional and logical) Display vertex attribute labels?

cex.main

Font size of title in plot graph.

col.main

Font colour of title in plot graph.

font.main

Font family of title in plot graph.

coord

(optional) Data frame with graph coordinates for vertices after binomial projection.

clu

(optional) Clustering of vertices as a list of vectors with integers or NULL (see details).

cex

(optional) Vertex size.

lwd

(optional, ignored for valued) Width of edges.

pch

(optional) Symbols for vertices in domain and in codomain.

lty

(optional) Shapes of edges in domain and in codomain.

bwd

(optional, default 1) Real number for width between bundle edges.

bwd2

(optional) Width of bundle loop edges.

att

(optional) Vector or array representing vertex attributes.

bg

(optional) Background colour of plot graph.

mar

(optional) Vector with margins for plot.

pos

(optional) Positions of labels from vertex:

  • 1: Below

  • 2: Left

  • 3: Above

  • 4: Right

  • 0: Centre

asp

(optional, asp=NA cover whole canvas) Aspect ratio of plot.

ecol

(optional) Colour of edges by type in domain and codomain.

vcol

(optional) Colour of vertices.

vcol0

(optional, only for pch=21 through pch=25) Colour of vertices contour.

col

(optional) Alias for vcol.

lbat

(optional) Labels for vertex attributes.

loops

(optional and logical) Plot loops in graph?

rot

(optional) Clockwise rotation in degrees on graph.

mirrorX

(optional) Mirror by \(X\) axis.

mirrorY

(optional) Mirror by \(Y\) axis.

mirrorD

(optional) Mirror reflection across diagonal \(Y=X\).

mirrorL

(optional) Mirror reflection across diagonal \(Y=-X\).

mirrorV

“Same as mirrorX”.

mirrorH

“Same as mirrorY”.

hds

(optional, for directed) Head scale of arcs.

scl

(optional) Numerical scalar (\(x\) and \(y\)) or vector (\(x\), \(y\)) of graph scale.

vedist

(optional) Vertex--edge distance.

vldist

(optional) Vertex--loop distance.

flip

(optional and logical) Flip loops?

ffamily

(optional) Font family of vertex labels in graph.

fstyle

(optional) Font style of vertex labels in graph with options: bold, italic, bolditalic.

fsize

(optional) Font size of vertex labels in graph.

fcol

(optional) Font colour of text in graph vertices.

valued

(optional and logical) Depict a valued graph?

modes

(optional, for “Multilevel” class) Vector of domains and codomains in net matrices.

elv

(experimental for "bip") Elevation of intra-domain edges.

lng

(experimental for "bip") Elevation control intra-domain edges.

nr

(optional, for conc) Integer or NULL with number of radii layout.

new

(optional, logical) Plot a new graph on existing canvas?

jitter

(optional, for stress) Amount of jitter to add on coordinates.

...

Additional argument items.

Details

Multilevel graphs represent networks with multiple “levels”, such as distinct domains within a network structure. These networks may include ties both within and between domains.

Because this function accepts many arguments, they may be collected in a list and supplied through the scope option. The list can contain vectors, scalars, or combinations of both for rendering.

The bundle widths bwd and bwd2 range from 0, where edges are collapsed, to the default value of 1, depending on vertex size. Values greater than one are allowed when valued option is used.

In multilevel structures, argument clu serves to assign network members to classes. Setting the corresponding vector to NULL places all members of a domain or codomain in a single class. Likewise, setting argument nr to NULL in the conc layout uses two radii, one for each domain.

See Also

mlvl, multigraph, bmgraph, frcd, stsm, conc