temperature.colors: Create a vector of 'temperature' colors (from blue over white...

View source: R/misc.R

temperature.colorsR Documentation

Create a vector of 'temperature' colors (from blue over white to red).

Description

Create a vector of 'temperature' colors (from blue over white to red).

Usage

temperature.colors(mn, mx = NULL, intensity = 1)

Arguments

mn

integer: when mx is not specified, total number of colors (>1) in the palette. when mx is specified: 'coldest' temperature (see examples)

mx

integer: 'warmest' temperature (see examples)

intensity

saturation of the most extreme color(s), in the range ⁠[0,1]⁠.

See Also

gray, hsv, rainbow

Examples

# full intensity
image(as.matrix(1:7), z=as.matrix(1:7), col=temperature.colors(7))
# half intensity
image(as.matrix(1:7), z=as.matrix(1:7), col=temperature.colors(7, intensity=0.5))
# skewed palette with more negative than positive temperature colors
image(as.matrix(1:7), z=as.matrix(1:7), col=temperature.colors(-4, 2))

kevinstadler/cultevo documentation built on Jan. 13, 2024, 11:22 p.m.