color.factor {wasim}R Documentation

Create colors with intensity according to the magnitude of a value

Description

Create colors with intensity according to the magnitude of a value

Usage

color.factor(color, value, max)

Arguments

color The base color(s) to use
value A vector of values
max The maximum value represented by full intensity

Value

A vector of colors, one entry for each value

Author(s)

Dominik Reusser

Examples

   data <- 1:10
   cols=color.factor("red", data, max=10)
   plot(data, col=cols)

   cols=color.factor(c("red","green","blue"), data, max=10)
   plot(data, col=cols)

[Package wasim version 1.0 Index]