View source: R/core-periphery.R
| plot.cograph_core_periphery | R Documentation |
Visualizes the network with core nodes highlighted (larger, red) and periphery nodes de-emphasized (smaller, blue).
## S3 method for class 'cograph_core_periphery'
plot(
x,
core_color = "#E41A1C",
periphery_color = "#377EB8",
core_size = 12,
periphery_size = 6,
...
)
x |
A |
core_color |
Color for core nodes. Default |
periphery_color |
Color for periphery nodes. Default |
core_size |
Numeric size for core nodes. Default 12. |
periphery_size |
Numeric size for periphery nodes. Default 6. |
... |
Additional arguments passed to |
Invisible x.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.