sample_plot: Plot hyperspectral cube samples

View source: R/plot_sample.R

sample_plotR Documentation

Plot hyperspectral cube samples

Description

This function provides a easy interface for simple plots.

Usage

sample_plot(cube, sample, id, summary = TRUE, loc = mean, disp = sd, ylab, ...)

Arguments

cube

The hyperspectral cube returned by the function cube_read from which the sample were taken.

sample

An object returned be the function cube_sample.

id

Optional specification of the samples to be used. Default to use all samples.

summary

Logical. Should every pixel be plotted or descriptive statistics?

loc

If summary is TRUE, the location function to be used. Defaults to mean.

disp

If summary is TRUE, the dispersion function to be used. Defaults to sd.

...

Arguments to be passed to cube_rgb (e.g., log = T) and descriptive statistics functions (e.g., na.rm = TRUE).

Details

This function provides a simple visualization for point (or circle) or line samples taken with the function cube_sample. The cube_rgb is called to show the spatial position of the samples and a second plot is called to plot the samples per wavelength. Note that by default, the ylab will be expression(rho~(unitless)) if not provided.

The location and dispersion metric functions should return a single value per sample. Read the documentation of sample_stat.


AlexCast/surfspec documentation built on July 7, 2022, 9:35 a.m.