bayes_plot_rgb {bayesEO}R Documentation

Plot RGB data cubes

Description

Plot RGB raster cube

Usage

bayes_plot_rgb(
  image,
  red,
  green,
  blue,
  xmin = NULL,
  xmax = NULL,
  ymin = NULL,
  ymax = NULL
)

Arguments

image

Object of class SpatRaster.

red

Band for red color.

green

Band for green color.

blue

Band for blue color.

xmin

Subset to be shown (xmin)

xmax

Subset to be shown (xmax)

ymin

Subset to be shown (ymin)

ymax

Subset to be shown (ymax)

Value

A plot object with an RGB image

Author(s)

Gilberto Camara, gilberto.camara@inpe.br

Examples

if (bayes_run_examples()) {
# Define location of a RGB files
rgb_dir <- system.file("/extdata/rgb", package = "bayesEO")
# list the file
files <- list.files(rgb_dir)
# build the full path
image_files <- paste0(rgb_dir, "/", files)
rgb_image <- bayes_read_image(image_files)
bayes_plot_rgb(rgb_image, red = "B11", green = "B8A", blue = "B03")
}

[Package bayesEO version 0.2.1 Index]