gplotMat: Plots network as adjacency matrix.

Description Usage Arguments Examples

View source: R/dgm.R

Description

Plots network as adjacency matrix.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
gplotMat(
  adj,
  title = NULL,
  colMapLabel = NULL,
  hasColMap = NULL,
  lim = c(0, 1),
  gradient = c("white", "orange", "red"),
  nodeLabels = waiver(),
  axisTextSize = 12,
  xAngle = 0,
  titleTextSize = 12,
  barWidth = 1,
  textSize = 12
)

Arguments

adj

2D adjacency matrix.

title

title.

colMapLabel

label for colormap.

hasColMap

FALSE turns off color map, default is NULL (on).

lim

vector with min and max value, data outside this range will be removed.

gradient

gradient colors.

nodeLabels

node labels.

axisTextSize

text size of the y and x tick labels.

xAngle

orientation of the x tick labels.

titleTextSize

text size of the title.

barWidth

width of the colorbar.

textSize

width of the colorbar.

Examples

1
2
3
4
5
6
7
# Generate some sample binary 5-node network structures for N=20, then compute
# proportion at each edge
N=20
x = array(rbinom(n=5*5*N, size=1, prob=0.30), dim=c(5,5,N))
A = apply(x, c(1,2), mean)

gplotMat(A, title = "network", colMapLabel = '%', barWidth = 0.3)

schw4b/multdyn documentation built on Dec. 14, 2021, 7:39 a.m.