plot.EMSC: Plot, print and summary methods for EMSC

View source: R/EMSC_results.R

plot.EMSCR Documentation

Plot, print and summary methods for EMSC

Description

Plotting routine for EMSC ojects. The default behaviour is to plot raw spectra, reference spectrum, polynomials, interferents, constituents, replicate model and corrected spectra. This can be tweaked by changing the parameters.

Usage

## S3 method for class 'EMSC'
plot(
  x,
  y,
  spec = "all",
  what = c("raw", "reference", "polynomials", "interferents", "constituents",
    "replicates", "corrected"),
  where = c(1, 1, 2, 3, 3, 4, 5),
  revX = FALSE,
  labels,
  type,
  lty,
  lwd = NULL,
  pch,
  cex = NULL,
  col,
  xlab,
  ylab,
  pretty.xlabels = TRUE,
  xlim,
  ...
)

## S3 method for class 'EMSC'
print(x, ...)

## S3 method for class 'EMSC'
summary(object, ...)

Arguments

x

An object fitted by the EMSC function.

y

Unused parameter to conform to generic plot.

spec

Parameter specifying if all spectra should be plotted (default) or a subset (numeric vector).

what

character vector defining what to plot.

where

integer vector defining which elements should be plotted in which subplot.

revX

Reverse x axis (default = FALSE).

labels

"names" or "numbers" uses column names for x axis labelling.

type

plotting type (line, points, ...).

lty

line type.

lwd

line width.

pch

plot character.

cex

symbol/line scaling.

col

symbol/line colour.

xlab

x label.

ylab

y label.

pretty.xlabels

Use pretty x labels (default = TRUE).

xlim

x limits.

...

Additional arguments to matplot.

object

An object fitted by the EMSC function.

Details

The parameters what and where must match so that the parts of the EMSC model end up in the correct subplot. There are limits to the freedom of this function.

print and summary return minimal information on the EMSC object.

Value

No return.

Author(s)

Kristian Hovde Liland

See Also

EMSC EMSC_model plot.EMSC

Examples

data(fishoil, package = "EMSC")
Raman      <- fishoil$Raman[, 850:3300]
EMSC.rep   <- EMSC(Raman, degree = 6, reference = Raman[30, ],
                   replicates = fishoil$replicates)
plot(EMSC.rep)
                   

EMSC documentation built on May 29, 2024, 3:07 a.m.