plotting {cba} | R Documentation |
Provides methods for proper plotting objects of class matrix
and
dist
.
## S3 method for class 'matrix': image(x, xlab = "", ylab = "", ...) ## S3 method for class 'dist': image(x, xlab = "", ylab = "", ...)
x |
an object of class matrix or dist . |
xlab, ylab |
labels for the x and y axis. |
... |
further arguments to image . |
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 converted to full-storage
representation and dispatched to the matrix method.
Christian Buchta
image
for details.
x <- matrix(sample(c(FALSE, TRUE),100,rep=TRUE),ncol=10) image(x) image(x, col=c("white","black")) axis(1) # the columns axis(2, at=c(1,3,5,7,9), labels=c(9,7,3,5,1)) # the reversed rows