plot.uncertainty_cube {sits} | R Documentation |
Plot uncertainty cubes
Description
plots a probability cube using stars
Usage
## S3 method for class 'uncertainty_cube'
plot(
x,
...,
tile = x[["tile"]][[1]],
palette = "RdYlGn",
style = "cont",
rev = TRUE,
n_colors = 10,
scale = 0.8
)
Arguments
x |
Object of class "probs_image". |
... |
Further specifications for plot. |
tile |
Tiles to be plotted. |
palette |
An RColorBrewer palette |
style |
Method to process the color scale ("cont", "order", "quantile", "fisher", "jenks", "log10") |
rev |
Reverse the color order in the palette? |
n_colors |
Number of colors to be shown |
scale |
Scale to plot map (0.4 to 1.0) |
Value
A plot object produced by the stars package with a map showing the uncertainty associated to each classified pixel.
Author(s)
Gilberto Camara, gilberto.camara@inpe.br
Examples
if (sits_run_examples()) {
# create a random forest model
rfor_model <- sits_train(samples_modis_ndvi, sits_rfor())
# create a data cube from local files
data_dir <- system.file("extdata/raster/mod13q1", package = "sits")
cube <- sits_cube(
source = "BDC",
collection = "MOD13Q1-6",
data_dir = data_dir
)
# classify a data cube
probs_cube <- sits_classify(
data = cube, ml_model = rfor_model, output_dir = tempdir()
)
# calculate uncertainty
uncert_cube <- sits_uncertainty(probs_cube, output_dir = tempdir())
# plot the resulting uncertainty cube
plot(uncert_cube)
}
[Package sits version 1.5.0 Index]