Description Usage Arguments Details References See Also Examples
Plot a matrix as a table with colored cells.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
mvalue |
Numeric matrix used to generate colors of table. |
mtext |
Character or numeric matrix to display in the table, default |
ctitle |
Character scalar, column title, default "Columns". |
rtitle |
Character scalar, row title, default "Rows". |
vcex |
Numeric scalar, character expansion for the table values, default 1. |
lcex |
Numeric scalar, character expansion for the column and row axis labels, default 1. |
mcex |
Numeric scalar, character expansion for the column and row axis titles, default 1. |
ctline |
Numeric scalar, number of lines from upper margin to display column title, default 3. |
rtline |
Numeric scalar, number of lines from left margin to display row title, default 4. |
colorange |
Vector of length 2 giving the color extremes to display for the lowest
and highest values in |
mrange |
Numeric vector of length 2, an explicit value range corresponding to
|
border |
Scalar or matrix of colors to be useed for the cell borders, default NA gives no border. |
... |
Additional parameters to |
Displays a plot with the same number of rectangular cells as there are values in the matrix. Each rectangle is colored to represent its corresponding value. The rectangles are arranged in the conventional display of a matrix with rows beginning at the top and columns at the left.
Based on a method posted by Henrik on 6 September 2013 on stackoverflow [link].
1 2 3 4 5 | m <- matrix(c(6, 5, 7, 20, 30, 5, 5, 10:14), nrow=3,
dimnames=list(c("a", "b", "c"), c("W", "X", "Y", "Z")))
plotmatrix(m)
plotmatrix(sqrt(m), m)
plotmatrix(m, mrange=c(0, 50))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.