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

Description Usage Arguments Value Author(s) Examples

View source: R/color.factor.R

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)

wasim documentation built on May 1, 2019, 6:50 p.m.