gplotMat {DGM} | R Documentation |
Plots network as adjacency matrix.
Description
Plots network as adjacency matrix.
Usage
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
# 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)
[Package DGM version 1.7.4 Index]