Presents matrix as a heatmap

Share:

Description

Presents matrix as a heatmap

Usage

1
2
3
## S3 method for class 'matrix'
plot(x, labs = c("X", "Y"), color.palette = c("default",
  "special"), main = "", ...)

Arguments

x

Matrix to plot.

labs

Vector of labels for X and Y axes.

color.palette

Character string "default" or "special" or a function accepting one argument and returning a color palette (for example rainbow).

main

Title for the plot.

...

Other parameters. They are currently ignored.

Author(s)

Alexander Dokumentov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

plot(matrix(rnorm(100),10,10), main = "Noise")
plot(matrix(1:100,10,10), c("Dimension 1", "Dimension 2"), main = "Value")

library(demography)
m <- log(fr.mort$rate$female[1:30, 150:160])
plot(m)
plot(m, color.palette = "special")
plot(m, color.palette = rainbow)

## End(Not run)