x2rgb: rgb colors from a numeric vector

View source: R/x2rgb.R

x2rgbR Documentation

rgb colors from a numeric vector

Description

create rgb colors from a numeric vector

Usage

x2rgb(x, breaks = NULL, u = FALSE, reverse = FALSE, ...)

Arguments

x

numeric vector

breaks

non decreasing numeri vector

u

logical. Uses the rank of x as x.

reverse

logic. If FALSE colors are blue for lower values of x and red for hight values of x. If TRUE, colors are red for lower values of x and blue for blue for hight values of x.

...

additional parameters passed to rgb.

Value

'transparent' if NA or the output of the rgb function

Warning

'transparent' is returned for NA

See Also

rgb

Examples

plot(0:5, pch=19, col=x2rgb(0:5))
plot(0:5, pch=19, col=x2rgb(0:5, c(0,3,6)))

eliaskrainski/emisc documentation built on Nov. 18, 2024, 11:02 a.m.