layerplot: Function for plotting multilayer networks

Description Usage Arguments Examples

View source: R/layerplot.R

Description

This function plots a multilayer network. It assumes that the x and y coordinates are in [0,1]

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
layerplot(
  upmat,
  lowmat,
  upcoords,
  lowcoords,
  yflat2,
  xover2,
  htdif,
  lwdhere = 1
)

Arguments

upmat

adjacency matrix for upper network

lowmat

adjacency matrix for lower network

upcoords

x-y coordinates for upper network

lowcoords

x-y coordinates for lower network

yflat2

proportional flattening of map

xover2

proportional right movement of map

htdif2

distance between upper and lower network

Examples

1
2
3
4
5
y1 <- matrix(c(0,0,0,1, 0,0,1,0, 0,0,0,1, 0,0,0,0),byrow=T, ncol=4)
y2 <- matrix(c(0,1,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,0,1,0),byrow=T, ncol=5)
x1 <- matrix(c(0.5,0.8, 0.9,0.9, 0.1,0.1, 0.5,0.5), byrow=T, ncol=2)
x2 <- matrix(c(0.5,0.8, 0.9,0.9, 0.1,0.1, 0.5,0.5, 0.3,0.8), byrow=T, ncol=2)
layerplot(upmat=y1,lowmat=y2,upcoords=x1,lowcoords=x2,yflat=0.5,xover=0.5, htdif=1)

GarrettLab/INApreliminary documentation built on June 7, 2021, 10:59 a.m.