bayes_plot_probs {bayesEO}R Documentation

Plot probability maps

Description

Plot probability maps

Usage

bayes_plot_probs(
  x,
  scale = 1e-04,
  labels = NULL,
  palette = "YlGnBu",
  tmap_scale = 1
)

Arguments

x

SpatRaster to be plotted.

scale

Scaling factor to apply to the data

labels

Labels to be plotted

palette

An RColorBrewer palette

tmap_scale

Global scale parameter for map (default: 1.0)

Value

A plot object

Author(s)

Gilberto Camara, gilberto.camara@inpe.br

Examples

if (bayes_run_examples()) {
    # get the probability file
    data_dir <- system.file("/extdata/probs/", package = "bayesEO")
    file <- list.files(data_dir)
    # build the full path
    probs_file <- paste0(data_dir, "/", file)
    # include the labels
    labels <- c("Water", "ClearCut_Burn", "ClearCut_Soil",
             "ClearCut_Veg", "Forest", "Wetland")
    # associate the labels to the names of the SpatRaster
    probs <- bayes_read_probs(probs_file, labels)
    # Plot the probability image
    bayes_plot_probs(probs,
                     scale = 0.0001,
                     tmap_scale = 1.0)
}


[Package bayesEO version 0.2.1 Index]