geneplotter (version 1.50.0)

GetColor: A function to get the Red-Blue color scheme used by dChip

Description

A simple, vectorized function that computes a Red/Blue color for plotting microarray expression data.

Usage

GetColor(value, GreenRed=FALSE, DisplayRange=3) dChip.colors(n) greenred.colors(n)

Arguments

value
The vector of expression values.
GreenRed
If TRUE the Green-Red colors are produced, otherwise Red-Blue are procduced.
DisplayRange
A parameter controlling the range of value's that will be plotted.
n
An integer saying how many colors to be in the palette.

Value

A vector of RGB colors suitable for plotting in R.

Details

GetColor is a simple mapping into RGB land provided by Cheng Li. dChip.colors provides functionality similar to that of topo.colors for the red--blue colors used for genome plots. greenred.colors does the same for the green-black-red gradient.

Examples

Run this code
  set.seed(10)
  x <- rnorm(10)
  GetColor(x)
  dChip.colors(10)

Run the code above in your browser using DataLab