plot.blocks: Plot blocks

Description Usage Arguments Details Examples

View source: R/blocks.R

Description

plots a block object

Usage

1
2
3
4
5
## S3 method for class 'blocks'
plot(x, col, xaxt = "n", yaxt = "n", xlab = "Nodes", ylab = "Nodes", ...)

## S3 method for class 'blocks'
image(x, col, xaxt = "n", yaxt = "n", xlab = "Nodes", ylab = "Nodes", ...)

Arguments

x

a blocks object to plot

col

colours for the plot

xaxt

override image parameters

yaxt

override image parameters

xlab

override image parameters

ylab

override image parameters

...

additional parameters for image

Details

plot the block assignments in a blocks object as a matrix, color-coded by block membership

Examples

1
2
3
4
5
## Assign six nodes to four blocks:
b <- blocks(c(1,1,2,3,4,4), 4)
plot(b)
## note that the lower left corner has one 2x2 red square
## indicating node 1 and 2 belong to the same block

SBMSplitMerge documentation built on July 1, 2020, 5:23 p.m.