colorbar: colorpalette generation

Description Usage Arguments Value Examples

View source: R/faceplot.R

Description

The function is used to genrate color palette, which will used for visualed to render mesh object.

Usage

1
2
colorbar(vec, col.pal = colorRampPalette(c("blue", "red")),
  output = NULL)

Arguments

vec

A vector. Each of its elements will be assigned a RGB value from the color palette

col.pal

A list of colors or a colorRampPalette object. The default is colorRampPalette(c('blue','red'))

output

the output path. the default is NULL. if output is NULL, the color bar will not be printed to a file.

Value

a vector of colors

Examples

1
colorbar(1:10,c('#377EB8', '#4DAF4A','white', '#984EA3', '#FF7F00'))

changebio/MAGPA documentation built on June 15, 2020, 9:26 p.m.