plot.raster

Plotting Raster Images

This functions implements a plot method for raster images.

Keywords
hplot
Usage
# S3 method for 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. y will be ignored.
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 rasterImage function.
See Also

plot.default, rasterImage.

Aliases
  • plot.raster
Examples
library(graphics) 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)
Documentation reproduced from package graphics, version 3.3.2, License: Part of R 3.3.2

Community examples

Looks like there are no examples yet.