Learn R Programming

ChemoSpec (version 2.0-2)

plotSpectra: Plot Spectra Object

Description

Plots the spectra stored in a "Spectra" object. One may choose which spectra to plot, and the x range to plot. Spectra may be plotted offset or stacked. The vertical scale is controlled by a combination of several parameters.

Usage

plotSpectra(spectra, which = c(1), yrange = range(spectra$data),
	offset = 0, amplify = 1, lab.pos = mean(spectra$freq), ...)

Arguments

Value

None. Side effect is a plot.

Rdversion

1.1

References

http://academic.depauw.edu/~hanson/ChemoSpec/ChemoSpec.html

Examples

Run this code
data(CuticleIR)
myt <- expression(bolditalic(Portulaca)~bolditalic(oleracea)~bold(Cuticle~IR~Spectra))
plotSpectra(CuticleIR, main = myt,
	which = c(10:11, 40:41, 100:101, 140:141, 150:151),
	yrange = c(0,10),
	offset = 0.8, amplify = 1.0, lab.pos = 2000)

Run the code above in your browser using DataLab