Learn R Programming

colorRamps (version 2.3.1)

rgb.tables: constructs color palettes with sharp breaks

Description

rgb.tables wraps table.ramp and simply passes values supplied in the red, green and blue arguments. table.ramp makes a color ramp with a flat top.

Usage

rgb.tables(n, red = c(0.75, 0.25, 1), green = c(0.5, 0.25, 1), blue =
c(0.25, 0.25, 1))
table.ramp(n, mid = 0.5, sill = 0.5, base = 1, height = 1)

Value

rgb.tables returns a color palette. table.ramp returns a simple vector of values.

Arguments

n

number of colors to generate

red

a length 3 vector with values mid, sill and base

green

same as red

blue

same as red

mid

table center on (0, 1)

sill

width of table top on (0, 1)

base

width of table base on (0, 1)

height

sill height on (0, 1)

Author

Timothy H. Keitt

References

Keitt, T. H. (2008) Coherent ecological dynamics induced by large scale disturbance. Nature 454:331-334

See Also

Examples

Run this code
table.ramp(10)
rgb.tables(10)

Run the code above in your browser using DataLab