Plot spectra

Description

Plots reflectance spectra in different arrangements.

Usage

1
2
3
## S3 method for class 'rspec'
plot(x, select = NULL, type = c("overlay", "stack",
  "heatmap"), varying = NULL, n = 100, ...)

Arguments

x

(required) a data frame, possibly an object of class rspec, with a column with wavelength data, named 'wl', and the remaining column containing spectra to plot.

select

specification of which spectra to plot. Can be a numeric vector or factor (e.g., sex=='male')

type

what type of plot should be drawn. Possibilities are:

  • overlay (default) for plotting multiple spectra in a single panel with a common y-axis

  • stack for plotting multiple spectra in a vertical arrangement

  • heatmap for plotting reflectance values by wavelength and a third variable (varying)

varying

a numeric vector giving values for y-axis in heatplot

n

number of bins with which to interpolate colors and varying for the heatplot.

...

additional arguments passed to plot (or image for 'heatmap').

Author(s)

Chad Eliason cme16@zips.uakron.edu

See Also

spec2rgb, image, plot

Examples

1
2
3
4
5
6
## Not run: 
data(teal)
plot(teal, type = 'overlay')
plot(teal, type = 'stack')
plot(teal, type = 'heatmap')
## End(Not run)