im.plotRGB.auto: Automatically Plot a Raster Image as an RGB Composite

View source: R/im.plotRGB.auto.R

im.plotRGB.autoR Documentation

Automatically Plot a Raster Image as an RGB Composite

Description

This function visualizes a multispectral raster image using the first three bands as an RGB composite. It applies a linear contrast stretch to enhance visualization.

Usage

im.plotRGB.auto(x, title = "Main")

Arguments

x

A 'SpatRaster' object representing the input multispectral image.

title

A character string specifying the plot title (default: "Main").

Value

Invisibly returns 'x'.

See Also

[im.import()], [im.ggplot()]

Examples

library(terra)

r <- rast(nrows = 10, ncols = 10, nlyrs = 3)
values(r) <- runif(ncell(r) * 3)

im.plotRGB.auto(r, title = "RGB Visualization")

imageRy documentation built on March 8, 2026, 1:06 a.m.