pimage {seriation} | R Documentation |
Provides methods for plotting image plots for
matrix and dist
objects given a permutation.
pimage(x, order = NULL, col = NULL, main ="", xlab = "", ylab = "", axes = TRUE, ..., newpage=TRUE, pop=TRUE) ## S3 method for class 'matrix' pimage(x, order=NULL, col=NULL, main="", xlab="", ylab="", axes=TRUE, ..., newpage=TRUE, pop=TRUE) ## S3 method for class 'dist' pimage(x, order = NULL, col = NULL, main="", xlab="", ylab="", axes = TRUE, upper.tri = TRUE, lower.tri = TRUE, ..., newpage=TRUE, pop=TRUE)
x |
a matrix or an object of class |
order |
an object of class |
col |
a list of colors used. If |
main |
Plot title. |
xlab, ylab |
labels for the x and y axes. |
axes |
a logical indicating whether to add axes using the
labels of |
upper.tri, lower.tri |
a logical indicating whether to show the upper or lower triangle of the distance matrix. |
... |
further arguments passed on to |
newpage, pop |
two logical. Start plot on a new page and pop the viewports after plotting (see Grid). |
Plots a 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 before plotting.
Christian Buchta and Michael Hahsler
x <- matrix(sample(c(FALSE, TRUE), 150, rep=TRUE), ncol=10) ## matrix pimage(x, main = "random data") ## plot seriated matrix pimage(x, seriate(x), col = c("white", "green"), main = "reordered data") ## distances d <- dist(x, method = "binary") pimage(d, lower.tri = FALSE) pimage(d, seriate(d), lower.tri = FALSE)