View source: R/segment.windows.R
segment.windows | R Documentation |
Displays how spectra are divided in windows
segment.windows(
xblock = NULL,
yblock = NULL,
windows = 3,
fade = 0.3,
xlab = "Wavelength",
ylab = "Absorbance",
title = paste("Spectra divided in", windows, "segments", sep = " "),
legend = NULL,
grad = 10
)
xblock |
A matrix containing one spectra for each observation. |
yblock |
A vector containing the concentration associated to each spectra in the xblock matrix. |
windows |
Number of windows the spectra has to be divided in. |
fade |
Opacity of the window. |
xlab |
Title of the x axis. |
ylab |
Title of the y axis. |
title |
Title of the plot. |
legend |
Name of the substance which drives the gradient of spectra’s mapping. |
grad |
Number of colors that are used to build the gradient. |
Plot of spectra in which segments have a different background color.
data(beer)
conc=unlist(beer[,1])
sp=beer[,2:ncol(beer)]
names(sp)=convert.names.wl(1100,2250,2)
segment.windows(sp,conc,windows=7,fade=0.25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.