Learn R Programming

cograph (version 2.7.2)

plot.cograph_core_periphery: Plot Core-Periphery Structure

Description

Visualizes the network with core nodes highlighted (larger, red) and periphery nodes de-emphasized (smaller, blue).

Usage

# S3 method for cograph_core_periphery
plot(
  x,
  core_color = "#E41A1C",
  periphery_color = "#377EB8",
  core_size = 12,
  periphery_size = 6,
  ...
)

Value

Invisible x.

Arguments

x

A cograph_core_periphery object from core_periphery.

core_color

Color for core nodes. Default "#E41A1C".

periphery_color

Color for periphery nodes. Default "#377EB8".

core_size

Numeric size for core nodes. Default 12.

periphery_size

Numeric size for periphery nodes. Default 6.

...

Additional arguments passed to splot.

Examples

Run this code
adj <- matrix(c(0,1,1,1,0, 1,0,1,1,0, 1,1,0,1,1,
                1,1,1,0,1, 0,0,1,1,0), 5, 5)
rownames(adj) <- colnames(adj) <- LETTERS[1:5]
cp <- cograph::core_periphery(adj)
plot(cp)

Run the code above in your browser using DataLab