image

0th

Percentile

Image

Create an "image" type plot of a RasterLayer. This is an implementation of a generic function in the graphics package. In most cases the plot function would be preferable because it produces a legend (and has some additional options).

Keywords
methods, spatial
Usage
image(x, ...) 
# S4 method for RasterLayer
image(x, maxpixels=500000, useRaster=TRUE, ...)

# S4 method for RasterStackBrick image(x, y=1, maxpixels=100000, useRaster=TRUE, main, ...)

Arguments
x

Raster* object

maxpixels

integer > 0. Maximum number of cells to use for the plot. If maxpixels < ncell(x), sampleRegular is used before plotting

useRaster

If TRUE, the rasterImage function is used for plotting. Otherwise the image function is used. This can be useful if rasterImage does not work well on your system (see note)

main

character. Main plot title

...

Any argument that can be passed to image (graphics package)

y

If x is a RasterStack or RasterBrick: integer, character (layer name(s)), or missing to select which layer(s) to plot

Note

raster uses rasterImage from the graphics package. For unknown reasons this does not work on Windows Server and on a few versions of Windows XP. On that system you may need to use argument useRaster=FALSE to get a plot.

See Also

plot, image, contour

Aliases
  • image
  • image,RasterLayer-method
  • image,RasterStackBrick-method
Examples
# NOT RUN {
r <- raster(system.file("external/test.grd", package="raster"))
image(r)
# }
Documentation reproduced from package raster, version 3.3-7, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.