divergeZimage {TIMP} | R Documentation |
Plots a matrix with a diverging palette, with the center value of the palette possible to set
Description
An image plot of a matrix is a way of visualizing data; when the data represents a quantity like transient absorption, where negative values represent a different phenomena than positive values, it can be useful to set values at zero in the image plot to grey, whereas positive values are assigned to red, and negative values are assigned to blue. Alternately, when comparing image plots of several matrices, it may be useful to set the value assigned to grey uniformly, with values above this threshold assigned to red, and below this threshold assigned to blue.
Usage
divergeZimage(ob, out=FALSE, file="divergeZimage.pdf",
lin = 1, title = "", center = 0,
x2 = vector(), x= vector(),
plainmat = FALSE, ylab="wavelength (nm)",
xlab = "time (ns)")
Arguments
ob |
either an object of class |
out |
a logical indicating whether to write to the screen in the
case that this is possible or to a file; if |
file |
a character vector giving a filename to write to in the case
that |
lin |
range of |
title |
character vector giving a title for the plot |
center |
point assigned to grey in the diverging palette. |
x2 |
vector of labels for the columns of the matrix; used only if
|
x |
vector of labels for the rows of the matrix; used only if
|
plainmat |
logical indicating whether |
ylab |
character vector giving a label to put on the y-axis |
xlab |
character vector giving a label to put on the x-axis |
Value
No return value, called for side effects
Author(s)
Katharine M. Mullen, Ivo H. M. van Stokkum
See Also
Examples
exd <- dat(psi.df=matrix(rnorm(1000), ncol=100, nrow=100),
x=1:100,x2=1:100, nl=as.integer(100), nt=as.integer(100))
## by default linear range until 1 is used, logarithmic thereafter
divergeZimage(exd)
## can change this as desired
divergeZimage(exd, lin=10, title="plot linearly to 10")