Learn R Programming

sdetorus (version 0.1.10)

matlab.like.colorRamps: Generate color palettes similar to the Matlab default

Description

Generates Matlab-like color palettes. Functions imported from the colorRamps package.

Usage

matlab.like.colorRamps(n, two = FALSE)

Value

A vector of n colors.

Arguments

n

number of colors in the palette.

two

flag indicating whether to use colorRamps::matlab.like or colorRamps::matlab.like2.

Examples

Run this code
image(matrix(1:100, 10), col = matlab.like.colorRamps(100))
image(matrix(1:100, 10), col = matlab.like.colorRamps(100, two = TRUE))

Run the code above in your browser using DataLab