| gray.colors | R Documentation |
Create a vector of n gamma-corrected gray colors.
gray.colors(n, start = 0.3, end = 0.9, gamma = 2.2, alpha, rev = FALSE) grey.colors(n, start = 0.3, end = 0.9, gamma = 2.2, alpha, rev = FALSE)
n |
the number of gray colors (≥ 1) to be in the palette. |
start |
starting gray level in the palette (should be between
|
end |
ending gray level in the palette. |
gamma |
the gamma correction. |
alpha |
the opacity, if specified. |
rev |
logical indicating whether the ordering of the colors should be reversed. |
The function gray.colors chooses a series of n
gamma-corrected gray levels between start and end:
seq(start^gamma, end^gamma, length = n)^(1/gamma).
The returned palette contains the corresponding gray colors.
This palette is used in barplot.default.
grey.colors is an alias for gray.colors.
A vector of n gray colors.
gray,
rainbow,
palette.
require(graphics) pie(rep(1, 12), col = gray.colors(12)) barplot(1:12, col = gray.colors(12))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.