plot
function would be preferable because it produces a legend (and has some additional options).image(x, ...)
## S3 method for class 'RasterLayer':
image(x, maxpixels=500000, useRaster=TRUE, ...)
## S3 method for class 'RasterStackBrick':
image(x, y=1, maxpixels=100000, useRaster=TRUE, main, ...)
maxpixels < ncell(x)
, sampleRegular
is used before plottingTRUE
, 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)image
(graphics package)x
is a RasterStack or RasterBrick: integer, character (layer name(s)), or missing to select which layer(s) to plotplot
, image
, contour
r <- raster(system.file("external/test.grd", package="raster"))
image(r)
Run the code above in your browser using DataLab