Learn R Programming

BaTFLED3D (version 0.2.11)

im_mat: Plot a heatmap of a matrix in red and blue

Description

Displays a heatmap of a matrix using red and blue colors. Options to scale and sort as well as any other graphical parameters with ...

Usage

im_mat(x, high = "red", xaxt = "n", yaxt = "n", sort = FALSE,
  scale = FALSE, ballance = FALSE, zlim = NA, ...)

Arguments

x

matrix

high

string of either 'red' or 'blue' used to show higher values

xaxt

string indicating how to display the x axis. Suppress x axis with 'n'

yaxt

string indicating how to display the y axis. Suppress y axis with 'n'

sort

logical indicating whether the columns of the matrix should be sorted in decreasing order of their means

scale

logical indicating whether the matrix should be z scaled to have columns with norm zero and standard deviation one.

ballance

logical indicating whether to expand the range so it stays centered at zero

zlim

numeric bounds on the max and min range for colors.

...

other graphical parameters passed to image

Value

none

Examples

Run this code
# NOT RUN {
im_mat(matrix(1:12, nrow=3, ncol=4), sort=FALSE, scale=FALSE)
im_mat(matrix(1:12, nrow=3, ncol=4), sort=TRUE, scale=FALSE)
im_mat(matrix(1:12, nrow=3, ncol=4), sort=FALSE, scale=TRUE)
im_mat(matrix(1:12, nrow=3, ncol=4), sort=TRUE, scale=TRUE)
# }

Run the code above in your browser using DataLab