plot.vector_cube: Plot RGB vector data cubes

View source: R/sits_plot.R

plot.vector_cubeR Documentation

Plot RGB vector data cubes

Description

Plot RGB raster cube

Usage

## S3 method for class 'vector_cube'
plot(
  x,
  ...,
  band = sits_bands(x)[1],
  red = NULL,
  green = NULL,
  blue = NULL,
  tile = x$tile[[1]],
  date = NULL,
  seg_color = "black",
  line_width = 1,
  palette = "RdYlGn",
  rev = FALSE,
  tmap_options = NULL
)

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.

date

Date to be plotted.

seg_color

Color to show the segment boundaries

line_width

Line width to plot the segments boundary (in pixels)

palette

An RColorBrewer palette

rev

Reverse the color order in the palette?

tmap_options

Named list with optional tmap parameters max_cells (default: 1e+06) scale (default: 1.0) graticules_labels_size (default: 0.7) legend_title_size (default: 1.0) legend_text_size (default: 1.0) legend_bg_color (default: "white") legend_bg_alpha (default: 0.5)

Value

A plot object with an RGB image or a B/W image on a color scale using the pallete

Note

To see which color palettes are supported, please run

Author(s)

Gilberto Camara, gilberto.camara@inpe.br

Examples

if (sits_run_examples()) {
    # 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
    )
    # Segment the cube
    segments <- sits_segment(
        cube = cube,
        output_dir = tempdir(),
        multicores = 2,
        memsize = 4
    )
    # plot NDVI band of the second date date of the data cube
    plot(segments, band = "NDVI", date = sits_timeline(cube)[1])
}

e-sensing/sits documentation built on Jan. 28, 2024, 6:05 a.m.