plot.rspec | R Documentation |
Plots reflectance spectra in different arrangements.
## S3 method for class 'rspec'
plot(
x,
select = NULL,
type = c("overlay", "stack", "heatmap"),
varying = NULL,
n = 100,
labels = FALSE,
labels.stack = NULL,
labels.cex = 1,
wl.guide = TRUE,
...
)
x |
(required) a data frame, possibly an object of class |
select |
specification of which spectra to plot. Can be a numeric vector
or factor (e.g., |
type |
what type of plot should be drawn. Possibilities are:
|
varying |
a numeric vector giving values for y-axis in
|
n |
number of bins with which to interpolate colors and |
labels |
logical. Add labels identifying each spectrum to the outer plot
margin? Defaults to |
labels.stack |
a vector of labels for spectra when |
labels.cex |
size of the text labels when |
wl.guide |
logical determining whether visible light spectrum should be added to the x-axis. |
... |
additional arguments passed to |
Thomas White thomas.white026@gmail.com
Hugo Gruson hugo.gruson+R@normalesup.org
Chad Eliason cme16@zips.uakron.edu
spec2rgb()
, image()
, plot()
# Load angle-resolved reflectance data for a green-winged teal
data(teal)
# Create an overlay plot (default)
plot(teal)
# Create an stacked spectral plot
plot(teal, type = "stack")
# Create a reflectance heatmap
plot(teal, type = "heatmap")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.