Learn R Programming

cba (version 0.2-25)

image: Matrix Image Plots

Description

Implements a wrapper function to image for proper plotting of objects of class matrix and dist.

Usage

implot(x, xlab = "", ylab = "", axes = FALSE, ticks = 10,
       las = 2, ...)

Value

Returns the transformed x

invisibly.

Arguments

x

an object of class matrix or dist.

xlab, ylab

labels for the x and y axis.

axes

logical, indicating whether dimnames(x) should be drawn on the plot.

ticks

the number of tick-marks to use.

las

the axis style to use (see par).

...

further arguments to image.

Author

Christian Buchta

Details

Plots an object of class matrix in its original row and column orientation. This means, in a plot the columns become the x-coordinates and the reversed rows the y-coordinates.

If x is of class dist it is coerced to full-storage matrix representation.

See Also

image and par for details.

Examples

Run this code
x <- matrix(sample(c(FALSE, TRUE),100,rep=TRUE),ncol=10,
	    dimnames=list(1:10,LETTERS[1:10]))
implot(x)
implot(x, col=c("white","black"), axes = TRUE)

Run the code above in your browser using DataLab