bayes_plot_probs | R Documentation |
Plot probability maps
bayes_plot_probs(
x,
scale = 1e-04,
labels = NULL,
palette = "YlGnBu",
tmap_scale = 1
)
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) |
A plot object
Gilberto Camara, gilberto.camara@inpe.br
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.