ggblock | R Documentation |
Plot Blockmodel matrix
ggblock(
g,
blocks = NULL,
cols = NULL,
show_blocks = FALSE,
show_labels = FALSE
)
g |
igraph object with a sign edge attribute. |
blocks |
vector of block membership as obtained, e.g. from signed_blockmodel |
cols |
colors used for negative and positive ties |
show_blocks |
logical. Should block borders be displayed? (Default: FALSE) |
show_labels |
logical. Should node labels be displayed? (Default: FALSE) |
ggplot2 object
David Schoch
## Not run:
library(igraph)
data("tribes")
clu <- signed_blockmodel(tribes, k = 3, alpha = 0.5, annealing = TRUE)
ggblock(tribes, clu$membership, show_blocks = TRUE, show_labels = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.