plotBaseline: Plot method for "baseline" objects

View source: R/plotBaseline.R

plotBaselineR Documentation

Plot method for "baseline" objects

Description

Plot the original spectrum, the estimated baseline, and the corrected spectrum. Optionally zoom and pan plot, either with arguments or interactively.

Usage

## S4 method for signature 'baseline'
plot(x, y, specNo = 1, grid = FALSE, labels = 1:n, rev.x = FALSE,
     zoom = NULL, ...)
plotBaseline(x, y, specNo = 1, grid = FALSE, labels = 1:n, rev.x = FALSE,
             zoom = list(xz = 1, yz = 1, xc = 0, yc = 0), ...)

Arguments

x

The baseline object to be plotted

y

Unused. Ignored with a warning

specNo

The row number of the spectrum and baseline to plot. Defaults to 1

grid

Logical. Whether to show a grid or not. Defaults to FALSE

labels

Vector. Labels for the x tick marks. Defaults to 1:n

rev.x

Logical. Whether the spectrum should be reversed. Defaults to FALSE

zoom

Either TRUE (only for the plot method), which turns on the interactive zoom controls, or a list with components xz, xc, yz and yc, which specifies the desired zoom and pan. Defaults to no zoom or pan

...

Other arguments. Currently ignored

Details

The normal way to plot baseline objects is to use the plot method. The plotBaseline function is the underlying work-horse function, and is not meant for interactive use.

Note

Because the argument list of any plot method must start with x, y, and the plot method for the baseline class does not use the y argument, all arguments except x must be named explicitly. Positional matching will not work.

Author(s)

Kristian Hovde Liland and Bjørn-Helge Mevik

See Also

baseline, baseline, baselineGUI

Examples

data(milk)
bl <- baseline(milk$spectra[1,, drop=FALSE])
## Not run: 
  # Computationally intensive
  plot(bl)
  plot(bl, zoom = TRUE)
## End(Not run)

baseline documentation built on Nov. 18, 2023, 5:14 p.m.