getGradientPaletteFactory: Generate gradient palette maker

Description Usage Arguments Value See Also Examples

View source: R/plotting.R

Description

inspired by http://stackoverflow.com/questions/13353213/gradient-of-n-colors-ranging-from-color-1-and-color-2

Usage

1
getGradientPaletteFactory(colors = c("black", "white"))

Arguments

colors

pair of colors for gradient range (min, max): default is c('black','white')

Value

function (factory) that creates linear gradient palette for given number of colors

See Also

getDiscretePaletteFactory, colorRampPalette

Examples

1
2
paletteMaker = getGradientPaletteFactory(c("yellow","red"))
myPalette = paletteMaker(10)

toaster documentation built on May 30, 2017, 3:51 a.m.