bayes_plot_var {bayesEO} | R Documentation |
Plot variance maps
Description
Plot variance maps
Usage
bayes_plot_var(
x,
labels = NULL,
quantile = 0.75,
n = 15,
style = "equal",
palette = "YlGnBu",
tmap_scale = 1
)
Arguments
x |
SpatRaster to be plotted. |
labels |
Labels to be plotted |
quantile |
Thereshold of values to be plotted |
n |
Preferred number of classes |
style |
Method to process the color scale |
palette |
An RColorBrewer palette |
tmap_scale |
Global scale parameter for map (default: 1.5) |
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)
# calculate the variance
var <- bayes_variance(probs)
# Plot the variance image
bayes_plot_var(var,
n = 15,
style = "order",
quantile = 0.75,
palette = "YlGn",
labels = c("Forest", "ClearCut_Veg"))
}
[Package bayesEO version 0.2.1 Index]