Description Usage Arguments Value Note Author(s) References See Also Examples
View source: R/plotPercentageMatrix.r
Plots a numeric matrix using a color scale.
1 2 3 4 5 |
x |
Numeric matrix with column and row names. |
breaks |
Numeric vector defining breaks in the legend. This typically includes the lower limit (e.g. zero for percentage data) but not the upper limit. The default is useful for fraction data (range 0...1). |
colors |
A vector of color names to build the palette. |
useHatching |
Use hatching to improve the distinction between neighboring colors? (logical) |
translateRownames |
Function to translate row names. Must accept a vector and return a vector of character strings of the same length as the input |
translateColnames |
Function to translate column names. Must accept a vector and return a vector of character strings of the same length as the input |
mar |
Vector of length 4 passed to the |
rowGroups |
A vector of e.g. factors splitting the rows of |
invisible(NULL)
.
Note that the matrix is plotted in transposed form.
David Kneis david.kneis@tu-dresden.de
No references.
No links.
1 2 3 4 5 6 7 8 | x <- matrix(runif(24), nrow=4, ncol=6,
dimnames=list(paste("row", 1:4), paste("col", 1:6)))
plotColorMatrix(x=x, breaks=c(50,20,10,5,2,0)/100,
useHatching=TRUE, translateColnames=function(x){sapply(x, gsub,
patter="col", replacement="column", fixed=TRUE)}, rowGroups= c(1,1,2,2))
plotColorMatrix(x=x, breaks=c(50,20,10,5,2,0)/100,
useHatching=FALSE, translateColnames=function(x){sapply(x, gsub,
patter="col", replacement="column", fixed=TRUE)}, rowGroups= c(1,1,2,2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.