plot_chr {gcxgclab}R Documentation

Plot chromatogram

Description

plot_chr plots TIC data for chromatogram.

Usage

plot_chr(data, scale = "log", dim = 2, floor = -1, title = "Intensity")

Arguments

data

a list object. Data extracted from a cdf file, ideally the output from extract_data().

scale

a string object. Either 'linear' or 'log'. log refers to logarithm base 10. Default is log scale.

dim

a integer object. The time dimensions of the plot, either 1 or 2. Default is 2.

floor

a float object. The floor value for plotting. Values below floor will be scaled up. Default for linear plotting is 0, default for log plotting is 10^3.

title

a string object. Title placed at the top of the plot. Default title "Intensity".

Details

This function creates a contour plot using of TIC data vs the x and y retention times using ggplot from ggplot2 package (Wickham 2016).

Value

A ggplot object. A contour plot of TIC data plotted in two dimensional retention time.

References

Wickham H (2016). ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. ISBN 978-3-319-24277-4, https://ggplot2.tidyverse.org.

Examples

file <- system.file("extdata","sample1.cdf",package="gcxgclab")
frame <- extract_data(file,mod_t=.5)
plot_chr(frame, title='Raw Data', scale="linear")
plot_chr(frame, title='Log Intensity')


[Package gcxgclab version 1.0.1 Index]