colorschemes {ClassDiscovery} | R Documentation |
Creata a vector of N
contiguous colors.
redscale(N) greenscale(N) bluescale(N) blueyellow(N) redgreen(N)
N |
an integer; the number of distinct levels in the color map |
The color maps that ship with R (see, for example,
terrain.colors
) do not include the most common colors
maps found in used in publications in the microarray literature. This
collection of color maps expands the available options. The functions
redscale
, greenscale
, and bluescale
each range
from pure black for low values to a pure primary color for high
values.
The redgreen
color map ranges from pure green at the low end,
through black in the middle, to pure red at the high end. Although
this is the most common color map used in the microarray literature,
it will prove problematic for individuals with red-green color-blindness.
The blueyellow
color map ranges from pure blue at the low end,
through gray in the middle, to pure yellowe at the high end.
A character vector 'cv
' of color names. This can be used to
create a user-defined color palette for subsequent graphics by
'palette(cv)
' or directly in a 'col=
' specification in
'par
' or in graphics functions such as 'image
' or
'heatmap
'.
The names redgreen
and blueyellow
are inconsistent with
respect to which color represents low values and which color
represents high values. It is too late to fix this.
Kevin R. Coombes <kcoombes@mdanderson.org>
rainbow
, topo.colors
,
terrain.colors
, heat.colors
,
rgb
, image
, heatmap
,
palette
.
data <- matrix(1:1024, nrow=1024) image(data, col=bluescale(64)) image(data, col=redgreen(32)) image(data, col=redscale(128)) image(data, col=blueyellow(64)) rm(data) # cleanup