Learn R Programming

satellite (version 0.2.0)

plot: Plot a 'Satellite' object

Description

This is the standard plotting routine for the 'Satellite' class. Layers are drawn either from the start (default; limited to a maximum of 16 sub-plots) or according to the speficied band codes.

Usage

# S4 method for Satellite,ANY
plot(x, bcde = NULL,
  col = grDevices::grey.colors(100), ...)

Arguments

x

A 'Satellite' object, usually returned by satellite.

bcde

Band codes to be visualized, e.g. returned by getSatBCDE. If not supplied, the initial (up to) 16 layers are being visualized.

col

Color scheme.

...

Further arguments passed on to plot.default.

See Also

plot.default, par.

Examples

Run this code
# NOT RUN {
## sample data
path <- system.file("extdata", package = "satellite")
files <- list.files(path, pattern = glob2rx("LC8*.tif"), full.names = TRUE)
sat <- satellite(files)

# }
# NOT RUN {
## pan-sharpening
sat_ps <- panSharp(sat)

## draw initial 16 layers (raw and pan-sharpened)
library(RColorBrewer)
plot(sat_ps, col = brewer.pal(9, "Reds"))

## draw first and second band incl. pan-sharpened versions only
plot(sat_ps, bcde = c("B001n", "B001_PAN_sharpend",
                      "B002n", "B002_PAN_sharpend"))
# }

Run the code above in your browser using DataLab