col: Different Useful Color Palettes

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Defines several color palettes for pimage, dissplot and hmap.

Usage

1
2
3
4
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

colorRampPalette, pimage, dissplot, hmap.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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))

Example output



seriation documentation built on Oct. 23, 2020, 6:34 p.m.