plot.matrix | R Documentation |
This method draws a heat map to demonstrate a numeric matrix, using
gplots::heatmap.2
as the underlying engine. Note that
the method retains the original (unscaled) values in the matrix, as well as
the orders of rows and columns of the matrix.
## S3 method for class 'matrix' plot( x, breaks = 101, symbreaks = FALSE, col = NULL, low = "blue", mid = "white", high = "red", na.color = "black", lmat = NULL, ... )
x |
The matrix of numeric values to be plotted. |
breaks |
Either a numeric vector indicating the splitting points for
binning |
symbreaks |
Logical value indicating whether the break points should be
made symmetric about 0. Ignored if |
col |
Colors used for the heat map. Must have a length equal to the
number of break points minus 1. By default, colors are generated by
|
low, mid, high |
Arguments to be passed to
|
na.color |
Color to be used for missing ( |
lmat |
Position matrix for the layout of color key and heat map. To be
passed to |
... |
Further arguments to be passed to
|
The value returned from heatmap.2
.
colorpanel
for generating a sequence of
colors that varies smoothly; heatmap.2
for drawing
a heat map.
set.seed(17) x <- matrix(rnorm(30, sd = 2), nrow = 5) x[2, 5] <- NA # Use the default setting. plot(x) # Use break points symmetric about 0. plot(x, symbreaks = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.