View source: R/signatureFitMultiStepLib.R
plotMatrix | R Documentation |
This function plots a matrix of values. Data is visualised as circles scaled with respect to the largest value in the matrix, with the actual number shown. If thresholdMark is specified, then a different colour is used for entries that are equal or above the threshold.
plotMatrix(
dataMatrix,
output_file = NULL,
thresholdMark = NULL,
ndigitsafterzero = 2,
cex.numbers = 0.7,
title = NULL,
circlesColBasic = "#A1CAF1",
circlesColHighlight = "#F6A600",
sideVector = NULL,
sideVectorLabel = NULL,
sideVectorColours = c("#cf0000", "#F38400", "#8DB600"),
sideVectorThresholds = c(0.8, 0.9),
sideVectorNdigitsafterzero = 2
)
dataMatrix |
a data matrix or data frame |
output_file |
if an output file name is given (must be pdf), the matrix will be plotted to file |
thresholdMark |
threshold for using a different colour to highlight entries above a threshold |
ndigitsafterzero |
specify how many digits after the zero should be used to show the actual numbers |
cex.numbers |
scale the text used for the numbers in the matrix |
circlesColBasic |
colour used for the circles |
circlesColHighlight |
colour used for the circles that pass the thresholdMark |
sideVector |
optional vector that should be of the same length as the number of columns of dataMatrix. Leave NULL to omit. If specified, the values will be plotted on the left, leaving a gap from the main plotted matrix and using sideVectorLabel as the label for this column, as well as the colours in sideVectorColours |
sideVectorLabel |
label to be used when sideVector is specified |
sideVectorColours |
colours to be used for the sideVector circles. This vector should be one element longer than sideVectorThresholds |
sideVectorThresholds |
boundaries for using the sideVectorColours according to the values of sideVector. Values need to be increasing. For example, values of sideVector lower than sideVectorThresholds[1] will be coloured sideVectorColours[1], and values greater than sideVectorThresholds[length(sideVectorThresholds)] will be coloured sideVectorColours[length(sideVectorThresholds)+1] |
sideVectorNdigitsafterzero |
similar to ndigitsafterzero, but only affects sideVector values |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.