EVOLUTION-MANAGER
Edit File: gray.colors.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Gray Color Palette</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for gray.colors {grDevices}"><tr><td>gray.colors {grDevices}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Gray Color Palette</h2> <h3>Description</h3> <p>Create a vector of <code>n</code> gamma-corrected gray colors. </p> <h3>Usage</h3> <pre> gray.colors(n, start = 0.3, end = 0.9, gamma = 2.2, alpha = NULL, rev = FALSE) grey.colors(n, start = 0.3, end = 0.9, gamma = 2.2, alpha = NULL, rev = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>the number of gray colors (<i>≥ 1</i>) to be in the palette.</p> </td></tr> <tr valign="top"><td><code>start</code></td> <td> <p>starting gray level in the palette (should be between <code>0</code> and <code>1</code> where zero indicates <code>"black"</code> and one indicates <code>"white"</code>).</p> </td></tr> <tr valign="top"><td><code>end</code></td> <td> <p>ending gray level in the palette.</p> </td></tr> <tr valign="top"><td><code>gamma</code></td> <td> <p>the gamma correction.</p> </td></tr> <tr valign="top"><td><code>alpha</code></td> <td> <p>the opacity, is specified.</p> </td></tr> <tr valign="top"><td><code>rev</code></td> <td> <p>logical indicating whether the ordering of the colors should be reversed.</p> </td></tr> </table> <h3>Details</h3> <p>The function <code>gray.colors</code> chooses a series of <code>n</code> gamma-corrected gray levels between <code>start</code> and <code>end</code>: <code>seq(start^gamma, end^gamma, length = n)^(1/gamma)</code>. The returned palette contains the corresponding gray colors. This palette is used in <code><a href="../../graphics/html/barplot.html">barplot.default</a></code>. </p> <p><code>grey.colors</code> is an alias for <code>gray.colors</code>. </p> <h3>Value</h3> <p>A vector of <code>n</code> gray colors. </p> <h3>See Also</h3> <p><code><a href="gray.html">gray</a></code>, <code><a href="palettes.html">rainbow</a></code>, <code><a href="palette.html">palette</a></code>. </p> <h3>Examples</h3> <pre> require(graphics) pie(rep(1, 12), col = gray.colors(12)) barplot(1:12, col = gray.colors(12)) </pre> <hr /><div style="text-align: center;">[Package <em>grDevices</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>