Learn R Programming

BayesGPfit (version 1.1.0)

GP.create.cols: Create 256 colors gradually transitioning from Blue to Yellow to Red.

Description

Create 256 colors gradually transitioning from Blue to Yellow to Red.

Usage

GP.create.cols(num = 256L)

Value

A vector of RGB colors

Arguments

num

A integer number to specify the number of colors to generate. The default value is 256.

Author

Jian Kang <jiankang@umich.edu>

Examples

Run this code
colors = GP.create.cols(101L)
require(graphics)
filled.contour(volcano,col=colors,nlevels=length(colors)-1,asp=1)
filled.contour(volcano,color.palette = GP.create.cols, nlevels=256, asp = 1)

Run the code above in your browser using DataLab