
plots a probability cube using stars
# S3 method for probs_cube
plot(
x,
...,
tile = x$tile[[1]],
labels = NULL,
color_palette = "YlGnBu",
rev = FALSE,
tmap_options = NULL
)
A plot containing probabilities associated to each class for each pixel.
Object of class "probs_image".
Further specifications for plot.
Tile to be plotted.
Labels to plot (optional).
RColorBrewer palette
Reverse order of colors in palette?
List with optional tmap parameters tmap_max_cells (default: 1e+06) tmap_graticules_labels_size (default: 0.7) tmap_legend_title_size (default: 1.5) tmap_legend_text_size (default: 1.2) tmap_legend_bg_color (default: "white") tmap_legend_bg_alpha (default: 0.5)
Gilberto Camara, gilberto.camara@inpe.br
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()
)
# plot the resulting probability cube
plot(probs_cube)
}
Run the code above in your browser using DataLab