EVOLUTION-MANAGER
Edit File: rasterImage.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: Draw One or More Raster Images</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 rasterImage {graphics}"><tr><td>rasterImage {graphics}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Draw One or More Raster Images</h2> <h3>Description</h3> <p><code>rasterImage</code> draws a raster image at the given locations and sizes. </p> <h3>Usage</h3> <pre> rasterImage(image, xleft, ybottom, xright, ytop, angle = 0, interpolate = TRUE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>image</code></td> <td> <p>a <code>raster</code> object, or an object that can be coerced to one by <code><a href="../../grDevices/html/as.raster.html">as.raster</a></code>.</p> </td></tr> <tr valign="top"><td><code>xleft</code></td> <td> <p>a vector (or scalar) of left x positions.</p> </td></tr> <tr valign="top"><td><code>ybottom</code></td> <td> <p>a vector (or scalar) of bottom y positions.</p> </td></tr> <tr valign="top"><td><code>xright</code></td> <td> <p>a vector (or scalar) of right x positions.</p> </td></tr> <tr valign="top"><td><code>ytop</code></td> <td> <p>a vector (or scalar) of top y positions.</p> </td></tr> <tr valign="top"><td><code>angle</code></td> <td> <p>angle of rotation (in degrees, anti-clockwise from positive x-axis, about the bottom-left corner).</p> </td></tr> <tr valign="top"><td><code>interpolate</code></td> <td> <p>a logical vector (or scalar) indicating whether to apply linear interpolation to the image when drawing. </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p><a href="par.html">graphical parameters</a>.</p> </td></tr> </table> <h3>Details</h3> <p>The positions supplied, i.e., <code>xleft, ...</code>, are relative to the current plotting region. If the x-axis goes from 100 to 200 then <code>xleft</code> should be larger than 100 and <code>xright</code> should be less than 200. The position vectors will be recycled to the length of the longest. </p> <p>Plotting raster images is not supported on all devices and may have limitations where supported, for example (e.g., for <code>postscript</code> and <code>X11(type = "Xlib")</code> is restricted to opaque colors). Problems with the rendering of raster images have been reported by users of <code>windows()</code> devices under Remote Desktop, at least under its default settings. </p> <p>You should not expect a raster image to be re-sized when an on-screen device is re-sized: whether it is is device-dependent. </p> <h3>See Also</h3> <p><code><a href="rect.html">rect</a></code>, <code><a href="polygon.html">polygon</a></code>, and <code><a href="segments.html">segments</a></code> and others for flexible ways to draw shapes. </p> <p><code><a href="../../grDevices/html/dev.capabilities.html">dev.capabilities</a></code> to see if it is supported. </p> <h3>Examples</h3> <pre> require(grDevices) ## set up the plot region: op <- par(bg = "thistle") plot(c(100, 250), c(300, 450), type = "n", xlab = "", ylab = "") image <- as.raster(matrix(0:1, ncol = 5, nrow = 3)) rasterImage(image, 100, 300, 150, 350, interpolate = FALSE) rasterImage(image, 100, 400, 150, 450) rasterImage(image, 200, 300, 200 + xinch(.5), 300 + yinch(.3), interpolate = FALSE) rasterImage(image, 200, 400, 250, 450, angle = 15, interpolate = FALSE) 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>