Skip to contents

Plots a chrom_list, as returned by chromConverter::read_chroms(), as traces (plot_chroms()), a heatmap of samples (plot_chroms_heatmap()), or a contour plot of one sample (plot_chrom_contour()). If each sample holds several elements, the "dad" element is plotted, or for type = "traces" the one named by what.

Usage

# S3 method for class 'chrom_list'
plot(x, type = c("traces", "heatmap", "contour"), ...)

Arguments

x

A chrom_list object.

type

Type of plot: "traces" (the default), "heatmap", or "contour".

...

Arguments to the plotting function selected by type. lambdas names the traces to plot for "traces", and a single wavelength for "heatmap"; idx selects samples for "traces" and "heatmap", and one sample for "contour".

Value

The value returned by the selected plotting function.

Author

Ethan Bass

Examples

data(Sa_pr)
class(Sa_pr) <- c("chrom_list", "list")
plot(Sa_pr, lambdas = 210)

plot(Sa_pr, type = "heatmap", lambdas = 210)

plot(Sa_pr, type = "contour", idx = 1)