image2: Display a matrix image

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Creates a grid of colored rectangles to display a matrix

Usage

1
2
3
4
image2(x, col = rev(heat.colors(24)), breaks, log = FALSE,
 zeroNA=TRUE, sort01=FALSE, all=FALSE, border = NA, box.offset = 0.1,
 round = 3, cex, text.cex = 1, text.col = "black", mar = c(1, 3, 3, 1),
 labels = 2:3, label.offset = 0.1, label.cex = 1)

Arguments

x

A numeric matrix, typically with row and column names

col

A vector of colors for boxes

breaks

A numeric vector of break points or number of intervals into which x is to be cut. Default is the length of col

log

Cut values in x using a log scale, default TRUE

zeroNA

Set zeros to NA (and color white)

sort01

Sort rows in descending order using the entire string of numbers

all

Display entire matrix, default is first 50 rows and columns

border

The border color for boxes, default is no borders

box.offset

Percent reduction in box size (a number between 0 and 1), default is 10% reduction

round

Number of decimal places to display values of x in each box

cex

Magnification size of text and labels, if specified this will replace values in both text.cex and label.cex

text.cex

Magnification size of text in cells only

text.col

Color of text in cells, use NA to skip text labels

mar

Margins on four sides of plot

labels

A vector giving sides of the plot (1=bottom, 2=left, 3=top, 4=right) for row and column labels

label.offset

Amount of space between label and boxes

label.cex

Magnification size of labels

Details

Missing values (NAs) and zeroes are assigned to the color white (unless zeroNA is FALSE) and remaining values are cut into groups and colored using the assigned values.

Value

A image plot of the matrix in x

Author(s)

Chris Stubben

See Also

image

Examples

1
2
3
4
## top 20 Genus by year
data(proks)
z<-table2(genus(proks$name), year(proks$released), n=20)
 image2(z[,-ncol(z)], sort=TRUE, mar=c(1,10,3,1), cex=.8)

cstubben/genomes2 documentation built on May 14, 2019, 12:25 p.m.