Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

col

Different Useful Color Palettes


Description

Defines several color palettes for pimage, dissplot and hmap.

Usage

bluered(n, bias = 1)
greenred(n, bias = 1)
grays(n, power = 1)
greys(n, power = 1)

Arguments

n

number of different colors produces.

bias

a positive number. Higher values give more widely spaced colors at the high end.

power

control parameter determining how luminance should be increased (1 = linear, 2 = quadratic, etc.).

Details

bluered creates a blue-red color palette.

greenred creates a green-red color palette.

greys and grays creates gray scales.

See colorRampPalette to create your own color palettes.

Value

A vector with n colors.

Author(s)

Michael Hahsler

See Also

Examples

pimage(rbind(1:100))
pimage(rbind(1:100), col = greys(100, power=2))
pimage(rbind(1:100), col = bluered(100))
pimage(rbind(1:100), col = bluered(100, bias = 2))
pimage(rbind(-100:100), col = greenred(10))

## create your own color palettes 
## red to green (with 10 colors)
pimage(rbind(1:100), 
  col = colorRampPalette(colors = c("red", "yellow", "green"))(10))
## white to blue (with 100 colors)
pimage(rbind(1:100), 
  col = colorRampPalette(colors = c("white", "blue"))(100))

seriation

Infrastructure for Ordering Objects Using Seriation

v1.2-9
GPL-3
Authors
Michael Hahsler [aut, cre, cph], Christian Buchta [aut, cph], Kurt Hornik [aut, cph], Fionn Murtagh [ctb, cph], Michael Brusco [ctb, cph], Stephanie Stahl [ctb, cph], Hans-Friedrich Koehn [ctb, cph]
Initial release
2020-09-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.