EVOLUTION-MANAGER
Edit File: locator.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: Graphical Input</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 locator {graphics}"><tr><td>locator {graphics}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Graphical Input</h2> <h3>Description</h3> <p>Reads the position of the graphics cursor when the (first) mouse button is pressed. </p> <h3>Usage</h3> <pre> locator(n = 512, type = "n", ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>n</code></td> <td> <p>the maximum number of points to locate. Valid values start at 1.</p> </td></tr> <tr valign="top"><td><code>type</code></td> <td> <p>One of <code>"n"</code>, <code>"p"</code>, <code>"l"</code> or <code>"o"</code>. If <code>"p"</code> or <code>"o"</code> the points are plotted; if <code>"l"</code> or <code>"o"</code> they are joined by lines.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional graphics parameters used if <code>type != "n"</code> for plotting the locations.</p> </td></tr> </table> <h3>Details</h3> <p><code>locator</code> is only supported on screen devices such as <code>X11</code>, <code>windows</code> and <code>quartz</code>. On other devices the call will do nothing. </p> <p>Unless the process is terminated prematurely by the user (see below) at most <code>n</code> positions are determined. </p> <p>For the usual <code><a href="../../grDevices/html/x11.html">X11</a></code> device the identification process is terminated by pressing any mouse button other than the first. For the <code><a href="../../grDevices/html/quartz.html">quartz</a></code> device the process is terminated by pressing the <code>ESC</code> key. </p> <p>The current graphics parameters apply just as if <code>plot.default</code> has been called with the same value of <code>type</code>. The plotting of the points and lines is subject to clipping, but locations outside the current clipping rectangle will be returned. </p> <p>On most devices which support <code>locator</code>, successful selection of a point is indicated by a bell sound unless <code><a href="../../base/html/options.html">options</a>(locatorBell = FALSE)</code> has been set. </p> <p>If the window is resized or hidden and then exposed before the input process has terminated, any lines or points drawn by <code>locator</code> will disappear. These will reappear once the input process has terminated and the window is resized or hidden and exposed again. This is because the points and lines drawn by <code>locator</code> are not recorded in the device's display list until the input process has terminated. </p> <h3>Value</h3> <p>A list containing <code>x</code> and <code>y</code> components which are the coordinates of the identified points in the user coordinate system, i.e., the one specified by <code><a href="par.html">par</a>("usr")</code>. </p> <h3>References</h3> <p>Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) <em>The New S Language</em>. Wadsworth & Brooks/Cole. </p> <h3>See Also</h3> <p><code><a href="identify.html">identify</a></code>. <code><a href="../../grid/html/grid.locator.html">grid.locator</a></code> is the corresponding <span class="pkg">grid</span> package function. </p> <p><code><a href="../../grDevices/html/dev.capabilities.html">dev.capabilities</a></code> to see if it is supported. </p> <hr /><div style="text-align: center;">[Package <em>graphics</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>