Plots the traces from a list of chromatograms as a heatmap, with one row
per chromatogram and color encoding absorbance at a single wavelength.
Adapted from VPdtw::plot.VPdtw.
Usage
plot_chroms_heatmap(
x,
idx = NULL,
lambdas = NULL,
engine = c("base", "ggplot", "plotly"),
show_legend = TRUE,
xlim = NULL,
zlim = NULL,
legend_position = "topright",
title = "",
show_ylabs = FALSE
)Arguments
- x
A list of chromatograms in matrix format (timepoints × wavelengths) or a
peak_tablecontaining a pointer to a list of chromatograms accessible in the current environment.- idx
A vector of names or numerical indices of the chromatograms to plot. Defaults to all chromatograms.
- lambdas
A single wavelength to plot. Required for multi-wavelength chromatograms and optional for one-dimensional ones, where a supplied wavelength must match the column name.
- engine
Plotting backend to use. One of
"base","ggplot", or"plotly".- show_legend
Logical. Whether to display a color bar. Defaults to
TRUE.- xlim
Range of retention times to plot.
- zlim
Range of intensities spanned by the color scale. Values outside it are drawn in the end colors. Defaults to the range within
xlim. Pass the samezlimto several plots to put them on one scale.- legend_position
Position of legend. Defaults to
"topright". Cannot be repositioned when using thebaseplotting engine.- title
Title for plot.
- show_ylabs
Logical. Whether to label each row with its chromatogram name. Defaults to
FALSE.
Value
A plotly or ggplot object when engine = "plotly" or
engine = "ggplot", respectively. No value is returned when
engine = "base".
See also
Other visualization functions:
boxplot.peak_table(),
mirror_plot(),
plot.chrom_list(),
plot.matched_peak_list(),
plot.peak_list(),
plot.peak_table(),
plot_all_spectra(),
plot_chrom_contour(),
plot_chroms(),
plot_spectrum(),
scan_chrom()


