Learn R Programming

SBMSplitMerge (version 1.1.1)

plot.blocks: Plot blocks

Description

plots a block object

Usage

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

# S3 method for 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

Run this code
# NOT RUN {
## 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
# }

Run the code above in your browser using DataLab