Learn R Programming

baseline (version 1.3-5)

plotBaseline: 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 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

Author

Kristian Hovde Liland and Bjørn-Helge Mevik

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.

See Also

baseline, baseline, baselineGUI

Examples

Run this code
data(milk)
bl <- baseline(milk$spectra[1,, drop=FALSE])
if (FALSE) {
  # Computationally intensive
  plot(bl)
  plot(bl, zoom = TRUE)}

Run the code above in your browser using DataLab