Learn R Programming

sits (version 1.5.2)

plot.sar_cube: Plot SAR data cubes

Description

Plot SAR raster cube

Usage

# S3 method for sar_cube
plot(
  x,
  ...,
  band = NULL,
  red = NULL,
  green = NULL,
  blue = NULL,
  tile = x[["tile"]][[1]],
  dates = NULL,
  roi = NULL,
  palette = "Greys",
  rev = FALSE,
  scale = 1,
  first_quantile = 0.05,
  last_quantile = 0.95,
  max_cog_size = 1024,
  legend_position = "inside"
)

Value

A plot object with an RGB image or a B/W image on a color scale for SAR cubes

Arguments

x

Object of class "raster_cube".

...

Further specifications for plot.

band

Band for plotting grey images.

red

Band for red color.

green

Band for green color.

blue

Band for blue color.

tile

Tile to be plotted.

dates

Dates to be plotted.

roi

Spatial extent to plot in WGS 84 - named vector with either (lon_min, lon_max, lat_min, lat_max) or (xmin, xmax, ymin, ymax)

palette

An RColorBrewer palette

rev

Reverse the color order in the palette?

scale

Scale to plot map (0.4 to 1.0)

first_quantile

First quantile for stretching images

last_quantile

Last quantile for stretching images

max_cog_size

Maximum size of COG overviews (lines or columns)

legend_position

Where to place the legend (default = "inside")

Author

Gilberto Camara, gilberto.camara@inpe.br

Examples

Run this code
if (sits_run_examples()) {
    # create a SAR data cube from cloud services
    cube_s1_grd <-  sits_cube(
        source = "MPC",
        collection = "SENTINEL-1-GRD",
        bands = c("VV", "VH"),
        orbit = "descending",
        tiles = c("21LUJ"),
        start_date = "2021-08-01",
        end_date = "2021-09-30"
    )
    # plot VH band of the first date of the data cube
    plot(cube_s1_grd, band = "VH")
}

Run the code above in your browser using DataLab