EVOLUTION-MANAGER
Edit File: recordGraphics.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: Record Graphics Operations</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 recordGraphics {grDevices}"><tr><td>recordGraphics {grDevices}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Record Graphics Operations</h2> <h3>Description</h3> <p>Records arbitrary code on the graphics engine display list. Useful for encapsulating calculations with graphical output that depends on the calculations. Intended <em>only</em> for expert use. </p> <h3>Usage</h3> <pre> recordGraphics(expr, list, env) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>expr</code></td> <td> <p>object of mode <code><a href="../../base/html/expression.html">expression</a></code> or <code>call</code> or an unevaluated expression.</p> </td></tr> <tr valign="top"><td><code>list</code></td> <td> <p>a list defining the environment in which <code>expr</code> is to be evaluated.</p> </td></tr> <tr valign="top"><td><code>env</code></td> <td> <p>an <code><a href="../../base/html/environment.html">environment</a></code> specifying where <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> looks for objects not found in <code>list</code>.</p> </td></tr> </table> <h3>Details</h3> <p>The code in <code>expr</code> is evaluated in an environment constructed from <code>list</code>, with <code>env</code> as the parent of that environment. </p> <p>All three arguments are saved on the graphics engine display list so that on a device resize or copying between devices, the original evaluation environment can be recreated and the code can be re-evaluated to reproduce the graphical output. </p> <h3>Value</h3> <p>The value from evaluating <code>expr</code>. </p> <h3>Warning</h3> <p>This function is not intended for general use. Incorrect or improper use of this function could lead to unintended and/or undesirable results. </p> <p>An example of acceptable use is querying the current state of a graphics device or graphics system setting and then calling a graphics function. </p> <p>An example of improper use would be calling the <code>assign</code> function to performing assignments in the global environment. </p> <h3>See Also</h3> <p><code><a href="../../base/html/eval.html">eval</a></code> </p> <h3>Examples</h3> <pre> require(graphics) plot(1:10) # This rectangle remains 1inch wide when the device is resized recordGraphics( { rect(4, 2, 4 + diff(par("usr")[1:2])/par("pin")[1], 3) }, list(), getNamespace("graphics")) </pre> <hr /><div style="text-align: center;">[Package <em>grDevices</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>