map2color: converts numbers to colors

Description Usage Arguments Examples

Description

converts numbers to colors

Usage

1
2
map2color(x = NULL, pal = colorRampPalette(c("deepskyblue2", "black",
  "gold"))(100), limits = NULL)

Arguments

x

vector of numbers

pal

color palette

limits

vector of length two describing the limits of the color mapping

Examples

1
2
3
4
5
x = 1:10
y = rep(1,10)
pal = colorRampPalette(c("red","green","blue"))(10)
cols = map2color(x,pal=pal)
plot(x=x,y=y,col=cols,pch=19)

dphansti/Sushi2 documentation built on May 19, 2019, 4:05 p.m.