plot.raster
Plotting Raster Images
Description
This functions implements a plot
method for raster images.
Usage
## S3 method for class 'raster' plot(x, y, xlim = c(0, ncol(x)), ylim = c(0, nrow(x)), xaxs = "i", yaxs = "i", asp = 1, add = FALSE, ...)
Arguments
x, y | raster. |
xlim, ylim | Limits on the plot region (default from dimensions of the raster). |
xaxs, yaxs | Axis interval calculation style (default means that raster fills plot region). |
asp | Aspect ratio (default retains aspect ratio of the raster). |
add | Logical indicating whether to simply add raster to an existing plot. |
... | Further arguments to the |
See Also
Examples
require(grDevices) r <- as.raster(c(0.5, 1, 0.5)) plot(r) # additional arguments to rasterImage() plot(r, interpolate=FALSE) # distort plot(r, asp=NA) # fill page op <- par(mar=rep(0, 4)) plot(r, asp=NA) par(op) # normal annotations work plot(r, asp=NA) box() title(main="This is my raster") # add to existing plot plot(1) plot(r, add=TRUE)
Copyright (©) 1999–2012 R Foundation for Statistical Computing.
Licensed under the GNU General Public License.