EVOLUTION-MANAGER
Edit File: hsv.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: HSV Color Specification</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 hsv {grDevices}"><tr><td>hsv {grDevices}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>HSV Color Specification</h2> <h3>Description</h3> <p>Create a vector of colors from vectors specifying hue, saturation and value. </p> <h3>Usage</h3> <pre> hsv(h = 1, s = 1, v = 1, alpha) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>h,s,v</code></td> <td> <p>numeric vectors of values in the range <code>[0, 1]</code> for ‘hue’, ‘saturation’ and ‘value’ to be combined to form a vector of colors. Values in shorter arguments are recycled.</p> </td></tr> <tr valign="top"><td><code>alpha</code></td> <td> <p>numeric vector of values in the range <code>[0, 1]</code> for alpha transparency channel (0 means transparent and 1 means opaque).</p> </td></tr> </table> <h3>Details</h3> <p>Semi-transparent colors (<code>0 < alpha < 1</code>) are supported only on some devices: see <code><a href="rgb.html">rgb</a></code>. </p> <h3>Value</h3> <p>This function creates a vector of colors corresponding to the given values in HSV space. The values returned by <code>hsv</code> can be used with a <code>col=</code> specification in graphics functions or in <code>par</code>. </p> <h3>See Also</h3> <p><code><a href="hcl.html">hcl</a></code> for a perceptually based version of <code>hsv()</code>, <code><a href="rgb.html">rgb</a></code> and <code><a href="rgb2hsv.html">rgb2hsv</a></code> for RGB to HSV conversion; <code><a href="palettes.html">rainbow</a></code>, <code><a href="gray.html">gray</a></code>. </p> <h3>Examples</h3> <pre> require(graphics) hsv(.5,.5,.5) ## Red tones: n <- 20; y <- -sin(3*pi*((1:n)-1/2)/n) op <- par(mar = rep(1.5, 4)) plot(y, axes = FALSE, frame.plot = TRUE, xlab = "", ylab = "", pch = 21, cex = 30, bg = rainbow(n, start = .85, end = .1), main = "Red tones") par(op) </pre> <hr /><div style="text-align: center;">[Package <em>grDevices</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>