lmplot: Plotting Logical Matrices

View source: R/plots.r

lmplotR Documentation

Plotting Logical Matrices

Description

Implements a wrapper function to image that produces a black and white or gray-scale plot of a logical matrix.

Usage

lmplot(x, block.size = 1, gray = FALSE, xlab = "", ylab = "", 
       axes = FALSE, ...)

Arguments

x

a logical matrix.

block.size

the interpolation block size.

gray

optionally use a gray scale.

xlab

title for the x axis.

ylab

title for the y axis.

axes

option to plot axes.

...

further arguments to image.

Details

TRUE is represented by the color white and FALSE by the color black.

A lower resolution can be obtained by specifying an (interpolation) block size greater than one. Block densities can then be visualized by using the gray scale option. The number of levels of the palette corresponds to the block size but is capped to 8 levels (excluding white). Note that the opacity (blackness) corresponds with density (as on photographic film).

Author(s)

Christian Buchta

See Also

lminter for interpolating logical matrices and image for further plotting options

Examples

###
x <- matrix(sample(c(FALSE, TRUE), 64, rep=TRUE), ncol=8)
lmplot(x)
### use lower resolution
lmplot(x, block.size=2)
### use gray scale
lmplot(x, block.size=2, gray=TRUE)

cba documentation built on Sept. 11, 2024, 9:32 p.m.

Related to lmplot in cba...