Learn R Programming

bayesEO (version 0.2.2)

bayes_plot_rgb: 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
)

Value

A plot object with an RGB image

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)

Author

Gilberto Camara, gilberto.camara@inpe.br

Examples

Run this code
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")
}

Run the code above in your browser using DataLab