plot.probs_cube | R Documentation |
plots a probability cube using stars
## S3 method for class 'probs_cube'
plot(
x,
...,
tile = x[["tile"]][[1]],
labels = NULL,
palette = "YlGn",
rev = FALSE,
scale = 1,
max_cog_size = 512
)
x |
Object of class "probs_cube". |
... |
Further specifications for plot. |
tile |
Tile to be plotted. |
labels |
Labels to plot. |
palette |
RColorBrewer palette |
rev |
Reverse order of colors in palette? |
scale |
Scale to plot map (0.4 to 1.0) |
max_cog_size |
Maximum size of COG overviews (lines or columns) |
A plot containing probabilities associated to each class for each pixel.
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.1",
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.