the number of gray colors (≥ 1) to be in the
palette.
start
starting gray level in the palette (should be between
0 and 1 where zero indicates "black" and one
indicates "white").
end
ending gray level in the palette.
gamma
the gamma correction.
alpha
the opacity, is specified.
Details
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.
Value
A vector of n gray colors.
See Also
gray,
rainbow,
palette.
Examples
require(graphics)
pie(rep(1, 12), col = gray.colors(12))
barplot(1:12, col = gray.colors(12))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(grDevices)
> png(filename="/home/ddbj/snapshot/RGM3/R_rel/result/grDevices/gray.colors.Rd_%03d_medium.png", width=480, height=480)
> ### Name: gray.colors
> ### Title: Gray Color Palette
> ### Aliases: gray.colors grey.colors
> ### Keywords: color
>
> ### ** Examples
>
> require(graphics)
>
> pie(rep(1, 12), col = gray.colors(12))
> barplot(1:12, col = gray.colors(12))
>
>
>
>
>
> dev.off()
null device
1
>