EVOLUTION-MANAGER
Edit File: xyz.coords.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: Extracting Plotting Structures</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 xyz.coords {grDevices}"><tr><td>xyz.coords {grDevices}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Extracting Plotting Structures</h2> <h3>Description</h3> <p>Utility for obtaining consistent x, y and z coordinates and labels for three dimensional (3D) plots. </p> <h3>Usage</h3> <pre> xyz.coords(x, y = NULL, z = NULL, xlab = NULL, ylab = NULL, zlab = NULL, log = NULL, recycle = FALSE, setLab = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x, y, z</code></td> <td> <p>the x, y and z coordinates of a set of points. Both <code>y</code> and <code>z</code> can be left at <code>NULL</code>. In this case, an attempt is made to interpret <code>x</code> in a way suitable for plotting. </p> <p>If the argument is a formula <code>zvar ~ xvar + yvar</code>, <code>xvar</code>, <code>yvar</code> and <code>zvar</code> are used as x, y and z variables; if the argument is a list containing components <code>x</code>, <code>y</code> and <code>z</code>, these are assumed to define plotting coordinates; if the argument is a matrix or <code><a href="../../base/html/data.frame.html">data.frame</a></code> with three or more columns, the first is assumed to contain the x values, the 2nd the y ones, and the 3rd the z ones – independently of any column names that <code>x</code> may have. </p> <p>Alternatively two arguments <code>x</code> and <code>y</code> can be provided (leaving <code>z = NULL</code>). One may be real, the other complex; in any other case, the arguments are coerced to vectors and the values plotted against their indices. </p> </td></tr> <tr valign="top"><td><code>xlab, ylab, zlab</code></td> <td> <p>names for the x, y and z variables to be extracted.</p> </td></tr> <tr valign="top"><td><code>log</code></td> <td> <p>character, <code>"x"</code>, <code>"y"</code>, <code>"z"</code> or combinations. Sets negative values to <code><a href="../../base/html/NA.html">NA</a></code> and gives a warning.</p> </td></tr> <tr valign="top"><td><code>recycle</code></td> <td> <p>logical; if <code>TRUE</code>, recycle (<code><a href="../../base/html/rep.html">rep</a></code>) the shorter ones of <code>x</code>, <code>y</code> or <code>z</code> if their lengths differ.</p> </td></tr> <tr valign="top"><td><code>setLab</code></td> <td> <p>logical indicating if the resulting <code>xlab</code> and <code>ylab</code> should be constructed from the “kind” of <code>(x,y)</code>; otherwise, the arguments <code>xlab</code> and <code>ylab</code> are used.</p> </td></tr> </table> <h3>Value</h3> <p>A list with the components </p> <table summary="R valueblock"> <tr valign="top"><td><code>x</code></td> <td> <p>numeric (i.e., <code><a href="../../base/html/double.html">double</a></code>) vector of abscissa values.</p> </td></tr> <tr valign="top"><td><code>y</code></td> <td> <p>numeric vector of the same length as <code>x</code>.</p> </td></tr> <tr valign="top"><td><code>z</code></td> <td> <p>numeric vector of the same length as <code>x</code>.</p> </td></tr> <tr valign="top"><td><code>xlab</code></td> <td> <p><code>character(1)</code> or <code>NULL</code>, the axis label of <code>x</code>.</p> </td></tr> <tr valign="top"><td><code>ylab</code></td> <td> <p><code>character(1)</code> or <code>NULL</code>, the axis label of <code>y</code>.</p> </td></tr> <tr valign="top"><td><code>zlab</code></td> <td> <p><code>character(1)</code> or <code>NULL</code>, the axis label of <code>z</code>.</p> </td></tr> </table> <h3>Author(s)</h3> <p>Uwe Ligges and Martin Maechler</p> <h3>See Also</h3> <p><code><a href="xy.coords.html">xy.coords</a></code> for 2D.</p> <h3>Examples</h3> <pre> xyz.coords(data.frame(10*1:9, -4), y = NULL, z = NULL) xyz.coords(1:5, stats::fft(1:5), z = NULL, xlab = "X", ylab = "Y") y <- 2 * (x2 <- 10 + (x1 <- 1:10)) xyz.coords(y ~ x1 + x2, y = NULL, z = NULL) xyz.coords(data.frame(x = -1:9, y = 2:12, z = 3:13), y = NULL, z = NULL, log = "xy") ##> Warning message: 2 x values <= 0 omitted ... </pre> <hr /><div style="text-align: center;">[Package <em>grDevices</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>