plotRGB

0th

Percentile

Red-Green-Blue plot of RasterLayers

Make a Red-Green-Blue plot based on three layers (in a RasterBrick or RasterStack). Three layers (bands) are combined such that one is the red channel, one is the green channel, and one is the blue channel. This function could be used to make 'True (or false) color images' from Landsat and other multi-band satellite images.

Keywords
methods, spatial
Methods

plotRGB(x, r=1, g=2, b=3, scale=255 maxpixels=100000, ...) rll{ x a RasterLayer object r Integer. Index of the Red channel, between 1 and nlayers(x) g Integer. Index of the Green channel, between 1 and nlayers(x) b Integer. Index of the Blue channel, between 1 and nlayers(x) scale Integer. Maximum (possible) value in the three channels maxpixels Maximum number of pixels to use ... Any argument that can be passed to image (graphics package) }

Aliases
  • plotRGB
  • plotRGB,Raster-method
Examples
b <- brick(system.file("external/rlogo.grd", package="raster"))
plotRGB(b)
plotRGB(b, 3, 2, 1)
Documentation reproduced from package raster, version 1.0.4, License: GPL (>= 3)

Community examples

Looks like there are no examples yet.