color.factor: Create colors with intensity according to the magnitude of a...

Description Usage Arguments Value Author(s) Examples

Description

Create colors with intensity according to the magnitude of a value

Usage

1
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

1
2
3
4
5
6
7
   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)

Example output

Loading required package: e1071
Loading required package: hexbin
Loading required package: qualV
Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
Loading required package: klaR
Loading required package: MASS
Loading required package: som

tiger documentation built on May 2, 2019, 2:22 a.m.