Learn R Programming

pavo (version 1.0.0)

explorespec: Plot spectral curves

Description

Plots one or multiple spectral curves in the same graph to rapidly compare groups of spectra.

Usage

explorespec(rspecdata, by = NULL, scale = c("equal", "free"), legpos = "topright", ...)

Arguments

rspecdata
(required) a data frame, possibly an object of class rspec that has wavelength range in the first column, named 'wl', and spectral measurements in the remaining columns.
by
number of spectra to include in each graph (defaults to 1)
scale
defines how the y-axis should be scaled. 'free': panels can vary in the range of the y-axis; 'equal': all panels have the y-axis with the same range.
legpos
legend position control. Either a vector containing x and y coordinates or a single keyword from the list: "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center".
...
additional parameters to be passed to plot

Value

Spectral curve plots

Examples

Run this code
## Not run: 
# data(sicalis)
# explorespec(sicalis, 3)
# explorespec(sicalis, 3, ylim = c(0, 100), legpos = c(500, 80))## End(Not run)

Run the code above in your browser using DataLab