Learn R Programming

patchPlot (version 0.1.5)

colorPlot: colorPlot

Description

Plot a data.frame with color cells.

Usage

colorPlot(x, zeroColor, oneColor)

Arguments

x
data.frame to plot, taking values in [0,1] : the associated colors are then taken on the gradient from zeroColor to oneColor.
zeroColor
the "zero bound" color, in any valid R color format (e.g. "yellow", "#00FF00", ...)
oneColor
the "one bound" color, in any valid R color format (e.g. "yellow", "#00FF00", ...)

Value

NULL

References

Inspired from myImagePlot (http://www.phaget4.org/R/image_matrix.html)

See Also

getInterRGB

Examples

Run this code
dat <- matrix(runif(16), nrow=4)
dat <- as.data.frame(dat)
rownames(dat) <- colnames(dat) <- c("A", "B", "C", "D")
colorPlot(dat, "green", "red")

Run the code above in your browser using DataLab