Different Useful Color Palettes
Defines several color palettes for pimage
, dissplot
and hmap
.
bluered(n, bias = 1) greenred(n, bias = 1) grays(n, power = 1) greys(n, power = 1)
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.). |
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.
A vector with n
colors.
Michael Hahsler
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))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.