Learn R Programming

mosaic (version 1.9.1)

makeColorscheme: Create a color generating function from a vector of colors

Description

Create a color generating function from a vector of colors

Usage

makeColorscheme(col)

Value

a function that generates a vector of colors interpolated among the colors in col

Arguments

col

a vector of colors

Examples

Run this code
cs <- makeColorscheme( c('red','white','blue') )
cs(10)
cs(10, alpha=.5)

Run the code above in your browser using DataLab