Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

colramp

Color Ramps on Perceptually Linear Scales


Description

Functions for returning colors on perceptually linear scales, where steps correspond to ‘just detectable differences’.

Usage

LinGray (n, beg=1, end=92)
BTC     (n, beg=1, end=256)
LinOCS  (n, beg=1, end=256)
heat.ob (n, beg=1, end=256)
magent  (n, beg=1, end=256)
plinrain(n, beg=1, end=256)

Arguments

n

number of colors to return from the ramp

beg

begining of ramp, integer from 1-255

end

end of ramp, integer from 1-255

Details

Several precalulated color ramps, that are on a perceptually linear color scale. A perceptually linear color scale is a scale where each jump corresponds to a “just detectable difference” in color and the scale is percieved as linear by the human eye (emprically determined).

When using the ramps, if beg is less than end the ramp will be reversed.

Value

returns an array of colors

Author(s)

Nicholas Lewin-Koh

References

Haim Levkowitz (1997) Color Theory and Modeling for Computer Graphics, Visualization, and Multimedia Applications. Kluwer Academic Publishers, Boston/London/Dordrecht. http://www.cs.uml.edu/~haim/ColorCenter/

See Also

Examples

h <- hexbin(rnorm(10000),rnorm(10000))
plot(h, colramp= BTY)
## looks better if you shave the tails:
plot(h, colramp= function(n){LinOCS(n,beg=15,end=225)})

hexbin

Hexagonal Binning Routines

v1.28.2
GPL-2
Authors
Dan Carr <dcarr@voxel.galaxy.gmu.edu>, ported by Nicholas Lewin-Koh and Martin Maechler <maechler@stat.math.ethz.ch>, contains copies of lattice functions written by Deepayan Sarkar <deepayan.sarkar@r-project.org>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.