Learn R Programming

sits (version 0.10.0)

plot.brick_cube: Generic interface for plotting brick cubes

Description

plots a stack cube using terra

Usage

# S3 method for brick_cube
plot(x, y, ..., red, green, blue, time = 1)

Arguments

x

object of class "brick_cube"

y

ignored

...

further specifications for plot.

red

band for red color.

green

band for green color.

blue

band for blue color.

time

temporal instance to be plotted

Value

mapview object

Examples

Run this code
# NOT RUN {
# retrieve two files with NDVI and EVI from MODIS
ndvi_file <- c(system.file("extdata/raster/mod13q1/sinop-ndvi-2014.tif",
    package = "sits"
))
evi_file <- c(system.file("extdata/raster/mod13q1/sinop-evi-2014.tif",
    package = "sits"
))
# retrieve the timeline
data("timeline_2013_2014")
# create a data cube
sinop_2014 <- sits_cube(
    type = "BRICK",
    name = "sinop-2014",
    timeline = timeline_2013_2014,
    satellite = "TERRA",
    sensor = "MODIS",
    bands = c("NDVI", "EVI"),
    files = c(ndvi_file, evi_file)
)
# plot the data cube
plot(sinop_2014, red = "EVI", green = "EVI", blue = "EVI")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab