Learn R Programming

graphx (version 1.0)

spectrumcolors: Spectrum colour palette

Description

Generates smooth rainbow color scale from red to purple, similar to rainbow, but with improved smoothness

Usage

spectrumcolors(n, alpha = 1, rev = FALSE)

Arguments

n

integer number of colors in the scale

alpha

alpha transparency value (0=fully transparent, 1=fully opaque)

rev

logical flag indicating whether the ordering of the colors should be reversed

Value

Returns an n-vector of RGB colour strings.