EVOLUTION-MANAGER
Edit File: contourLines.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: Calculate Contour Lines</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 contourLines {grDevices}"><tr><td>contourLines {grDevices}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Calculate Contour Lines</h2> <h3>Description</h3> <p>Calculate contour lines for a given set of data. </p> <h3>Usage</h3> <pre> contourLines(x = seq(0, 1, length.out = nrow(z)), y = seq(0, 1, length.out = ncol(z)), z, nlevels = 10, levels = pretty(range(z, na.rm = TRUE), nlevels)) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x, y</code></td> <td> <p>locations of grid lines at which the values in <code>z</code> are measured. These must be in ascending order. By default, equally spaced values from 0 to 1 are used. If <code>x</code> is a <code>list</code>, its components <code>x$x</code> and <code>x$y</code> are used for <code>x</code> and <code>y</code>, respectively. If the list has component <code>z</code> this is used for <code>z</code>.</p> </td></tr> <tr valign="top"><td><code>z</code></td> <td> <p>a matrix containing the values to be plotted (<code>NA</code>s are allowed). Note that <code>x</code> can be used instead of <code>z</code> for convenience.</p> </td></tr> <tr valign="top"><td><code>nlevels</code></td> <td> <p>number of contour levels desired <b>iff</b> <code>levels</code> is not supplied.</p> </td></tr> <tr valign="top"><td><code>levels</code></td> <td> <p>numeric vector of levels at which to draw contour lines.</p> </td></tr> </table> <h3>Details</h3> <p><code>contourLines</code> draws nothing, but returns a set of contour lines. </p> <p>There is currently no documentation about the algorithm. The source code is in ‘<span class="file"><var><a href="../../base/html/Rhome.html">R_HOME</a></var>/src/main/plot3d.c</span>’. </p> <h3>Value</h3> <p>A list of contours. Each contour is a list with elements: </p> <table summary="R valueblock"> <tr valign="top"><td><code>level </code></td> <td> <p>The contour level.</p> </td></tr> <tr valign="top"><td><code>x </code></td> <td> <p>The x-coordinates of the contour.</p> </td></tr> <tr valign="top"><td><code>y </code></td> <td> <p>The y-coordinates of the contour.</p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="../../base/html/options.html">options</a>("max.contour.segments")</code> for the maximal complexity of a single contour line. </p> <p><code><a href="../../graphics/html/contour.html">contour</a></code>. </p> <h3>Examples</h3> <pre> x <- 10*1:nrow(volcano) y <- 10*1:ncol(volcano) contourLines(x, y, volcano) </pre> <hr /><div style="text-align: center;">[Package <em>grDevices</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>