Visually assess peak integration accuracy by overlaying fitted peak shapes over chromatographic traces.
Usage
# S3 method for class 'peak_list'
plot(
x,
...,
chrom_list,
idx = 1,
lambda = NULL,
points = FALSE,
ticks = FALSE,
alpha = 0.5,
color = NULL,
cex.points = 0.5,
numbers = FALSE,
cex.font = 0.5,
y.offset = 25,
plot_purity = FALSE,
res
)Arguments
- x
A
peak_listobject. Output from theget_peaksfunction.- ...
Additional arguments to main plot function.
- chrom_list
List of chromatograms (retention time x wavelength matrices). If missing, extracted from environment using the pointer in
x.- idx
Index or name of chromatogram to plot from
chrom_list.- lambda
Wavelength (column) to use for plotting.
- points
Logical. If
TRUE, display peak apex locations as points. Defaults toFALSE.- ticks
Logical. If
TRUE, mark peak boundaries with tick marks. Defaults toFALSE.- alpha
Transparency of fitted peak shapes. Defaults to
0.5.- color
Color used to fill fitted peak shapes. If
NULL, a default color is chosen based on the fitted model type.- cex.points
Size of points. Defaults to
0.5.- numbers
If
TRUE, label peaks with numeric identifiers. Defaults toFALSE.- cex.font
Font size if peaks are numbered. Defaults to
0.5.- y.offset
Y offset for peak numbers. Defaults to
25.- plot_purity
Logical. If
TRUE, overlays peak purity traces based on peak boundaries. Defaults toFALSE.- res
Time resolution for peak fitting. If missing, inferred from
chrom_list.
Details
The appearance of fitted peaks depends on the "fit" attribute of x, which
may be "gaussian", "egh", "bemg", or "raw".
Peak lists are expected to contain columns such as rt, height, start,
end, and sd, with additional parameters depending on the fit type.
Time units in x are used to rescale width parameters for plotting.
Peak rendering errors are silently ignored.
Side effects
Plots a chromatographic trace from the specified chromatogram (chr)
at the specified wavelength (lambda) with fitted peak shapes from the
provided peak_list drawn underneath the curve.
See also
Other visualization functions:
boxplot.peak_table(),
mirror_plot(),
plot.peak_table(),
plot_all_spectra(),
plot_chroms(),
plot_chroms_heatmap(),
plot_spectrum(),
scan_chrom()

