bError: Backscatter error visualization

View source: R/bError.R

bErrorR Documentation

Backscatter error visualization

Description

Visualize the modelled error between backscatter datasets, and optionally, additional predictors, in 2 and 3D.

Usage

bError(
  b,
  interactive = TRUE,
  cex = 0.75,
  pch = 16,
  alpha = 1,
  theta = 45,
  phi = 0
)

Arguments

interactive

Logical. If additional predictors were supplited to bulkshift, should an interactive 3D plot be returned?

cex

Size of scatterplot points.

pch

Scatterplot point symbols.

alpha

Alpha (transparency) of points in scatterplot.

theta

Azimuthal perspective on the 3D plot if interactive = FALSE.

phi

Colatitude perspective on the 3D plot if interactive = FALSE.

x

An (unmodified) list output from bulkshift.

Details

This function generates 2D or 3D scatterplots from the output of bulkshift using the plot3D and plot3Drgl packages to assist in diagnosing the quality of model fit. Sensible plotting parameters are implemented by default but see those packages for additional plotting options.

The output shows the error between backscatter datasets on the y-axis as a function of the "shift" dataset on the x-axis. If no other predictors were used for bulkshift, this is a 2D scatterplot. If additional predictors were supplied, they are plotted on the z-axis and a 3D scatterplot is generated.

In two dimensions, the backscatter error model is shown as a red line, which should pass through the center of the points. In three dimensions, the error model is shown as a plane.

Examples

bb2016 <- rast(system.file('extdata', 'bb2016.tif', package='bulkshift'))
bb2017 <- rast(system.file('extdata', 'bb2017.tif', package='bulkshift'))
bbdepth <- rast(system.file('extdata', 'bbdepth.tif', package='bulkshift'))

#2D example
b <- bulkshift(bb2017, bb2016)
bError(b)

#3D example
b <- bulkshift(bb2017, bb2016, bbdepth)
bError(b)


benjaminmisiuk/bulkshift documentation built on May 24, 2023, 9:32 p.m.