EVOLUTION-MANAGER
Edit File: plot.window.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: Set up World Coordinates for Graphics Window</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 plot.window {graphics}"><tr><td>plot.window {graphics}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Set up World Coordinates for Graphics Window</h2> <h3>Description</h3> <p>This function sets up the world coordinate system for a graphics window. It is called by higher level functions such as <code><a href="plot.default.html">plot.default</a></code> (<em>after</em> <code><a href="frame.html">plot.new</a></code>). </p> <h3>Usage</h3> <pre> plot.window(xlim, ylim, log = "", asp = NA, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>xlim, ylim</code></td> <td> <p>numeric vectors of length 2, giving the x and y coordinates ranges.</p> </td></tr> <tr valign="top"><td><code>log</code></td> <td> <p>character; indicating which axes should be in log scale.</p> </td></tr> <tr valign="top"><td><code>asp</code></td> <td> <p>numeric, giving the <b>asp</b>ect ratio y/x, see ‘Details’.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>further <a href="par.html">graphical parameters</a> as in <code><a href="par.html">par</a></code>. The relevant ones are <code>xaxs</code>, <code>yaxs</code> and <code>lab</code>. </p> </td></tr> </table> <h3>Details</h3> <dl> <dt>asp:</dt><dd> <p>If <code>asp</code> is a finite positive value then the window is set up so that one data unit in the x direction is equal in length to <code>asp</code> <i>*</i> one data unit in the y direction. </p> <p>Note that in this case, <code><a href="par.html">par</a>("usr")</code> is no longer determined by, e.g., <code>par("xaxs")</code>, but rather by <code>asp</code> and the device's aspect ratio. (See what happens if you interactively resize the plot device after running the example below!) </p> <p>The special case <code>asp == 1</code> produces plots where distances between points are represented accurately on screen. Values with <code>asp > 1</code> can be used to produce more accurate maps when using latitude and longitude. </p> </dd></dl> <p>Note that the coordinate ranges will be extended by 4% if the appropriate <a href="par.html">graphical parameter</a> <code>xaxs</code> or <code>yaxs</code> has value <code>"r"</code> (which is the default). </p> <p>To reverse an axis, use <code>xlim</code> or <code>ylim</code> of the form <code>c(hi, lo)</code>. </p> <p>The function attempts to produce a plausible set of scales if one or both of <code>xlim</code> and <code>ylim</code> is of length one or the two values given are identical, but it is better to avoid that case. </p> <p>Usually, one should rather use the higher-level functions such as <code><a href="plot.html">plot</a></code>, <code><a href="hist.html">hist</a></code>, <code><a href="image.html">image</a></code>, ..., instead and refer to their help pages for explanation of the arguments. </p> <p>A side-effect of the call is to set up the <code>usr</code>, <code>xaxp</code> and <code>yaxp</code> <a href="par.html">graphical parameters</a>. (It is for the latter two that <code>lab</code> is used.) </p> <h3>See Also</h3> <p><code><a href="../../grDevices/html/xy.coords.html">xy.coords</a></code>, <code><a href="plot.xy.html">plot.xy</a></code>, <code><a href="plot.default.html">plot.default</a></code>. </p> <p><code><a href="par.html">par</a></code> for the graphical parameters mentioned. </p> <h3>Examples</h3> <pre> ##--- An example for the use of 'asp' : require(stats) # normally loaded loc <- cmdscale(eurodist) rx <- range(x <- loc[,1]) ry <- range(y <- -loc[,2]) plot(x, y, type = "n", asp = 1, xlab = "", ylab = "") abline(h = pretty(rx, 10), v = pretty(ry, 10), col = "lightgray") text(x, y, labels(eurodist), cex = 0.8) </pre> <hr /><div style="text-align: center;">[Package <em>graphics</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>