EVOLUTION-MANAGER
Edit File: convertXY.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: Convert between Graphics Coordinate Systems</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 convertXY {graphics}"><tr><td>convertXY {graphics}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Convert between Graphics Coordinate Systems</h2> <h3>Description</h3> <p>Convert between graphics coordinate systems. </p> <h3>Usage</h3> <pre> grconvertX(x, from = "user", to = "user") grconvertY(y, from = "user", to = "user") </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x, y</code></td> <td> <p>numeric vector of coordinates.</p> </td></tr> <tr valign="top"><td><code>from, to</code></td> <td> <p>character strings giving the coordinate systems to convert between.</p> </td></tr> </table> <h3>Details</h3> <p>The coordinate systems are </p> <dl> <dt><code>"user"</code></dt><dd><p>user coordinates.</p> </dd> <dt><code>"inches"</code></dt><dd><p>inches.</p> </dd> <dt><code>"device"</code></dt><dd><p>the device coordinate system.</p> </dd> <dt><code>"ndc"</code></dt><dd><p>normalized device coordinates.</p> </dd> <dt><code>"nfc"</code></dt><dd><p>normalized figure coordinates.</p> </dd> <dt><code>"npc"</code></dt><dd><p>normalized plot coordinates.</p> </dd> <dt><code>"nic"</code></dt><dd><p>normalized inner region coordinates. (The ‘inner region’ is that inside the outer margins.)</p> </dd> <dt><code>"lines"</code></dt><dd><p>lines of margin (based on <code>mex</code>).</p> </dd> <dt><code>"chars"</code></dt><dd><p>lines of text (based on <code>cex</code>).</p> </dd> </dl> <p>(These names can be partially matched.) For the ‘normalized’ coordinate systems the lower left has value 0 and the top right value 1. </p> <p>Device coordinates are those in which the device works: they are usually in pixels where that makes sense and in big points (1/72 inch) otherwise (e.g., <code><a href="../../grDevices/html/pdf.html">pdf</a></code> and <code><a href="../../grDevices/html/postscript.html">postscript</a></code>). </p> <h3>Value</h3> <p>A numeric vector of the same length as the input. </p> <h3>Examples</h3> <pre> op <- par(omd=c(0.1, 0.9, 0.1, 0.9), mfrow = c(1, 2)) plot(1:4) for(tp in c("in", "dev", "ndc", "nfc", "npc", "nic", "lines", "chars")) print(grconvertX(c(1.0, 4.0), "user", tp)) par(op) </pre> <hr /><div style="text-align: center;">[Package <em>graphics</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>