spc.plot.overlay: Plotting multiple 'Spectra' objects inside a 'SpcList'

Description Usage Arguments Examples

Description

This function overlays spectra plots of several Spectra objects inside a SpcList object. The first element of the input SpcList object is plotted with spc.plot() while remaining elements are overlaid with spc.lines().

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
spc.plot.overlay(object,lab_cex,leg_idx, type, lty,lwd, col, ...)

## S4 method for signature 'SpcList'
spc.plot.overlay(
  object,
  lab_cex = 1,
  leg_idx = TRUE,
  type = "l",
  lty = 1,
  lwd = 1,
  col,
  ...
)

Arguments

object

A SpcList data

lab_cex

vector of character expansion sizes, used cyclically

leg_idx

logical If it is of length 1, it determines whether or not to display the legend. If length(leg_idx) is bigger than 1, then its lengths has to equal length(object). Default is TRUE.

type

character string (length 1 vector) or vector of 1-character strings indicating the type of plot for each column of y,

lty

vector of line types. See par().

lwd

numeric. Vector of line widths. See par().

col

A specification for the default plotting color. See par().

...

any further arguments to the plotting function matplot() or spc.plot()

Examples

1
2
3
4
5
6
sp <- spc.example_spectra()
BL = spc.makeSpcList(sp,"CAST")
spc.plot.overlay(BL)
spc.plot.overlay(BL, xlim=c(400,500),ylim=c(0,0.2),lwd=2)
spc.plot.overlay(BL, col=c("red"), leg_idx=FALSE, lty=2)
spc.plot.overlay(BL, col=c("red","blue","green","yellow","cyan","black"))

PranaGeo/Spectral documentation built on Feb. 21, 2020, 12:36 p.m.