plot_peakonly {gcxgclab} | R Documentation |
Plot only peaks
Description
plot_peakonly
plots the peaks from a chromatograph.
Usage
plot_peakonly(peak_df, title = "Peaks")
Arguments
peak_df |
a data.frame object. A data frame with 4 columns (Time, X, Y, Peak), ideally the output from top_peaks() or thr_peaks(). |
title |
a string object. Title placed at the top of the plot. Default title "Peaks". |
Details
This function creates a circle plot of the peak intensity vs
the x and y retention times using ggplot
from ggplot2
package (Wickham 2016). The size of the circle indicates the
intensity of the peak.
Value
A ggplot object. A circle plot of peak intensity in 2D 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
file1 <- system.file("extdata","sample1.cdf",package="gcxgclab")
frame <- extract_data(file1,mod_t=.5)
peaks <- top_peaks(frame$TIC_df, 5)
plot_peakonly(peaks,title="Top 20 Peaks")
[Package gcxgclab version 1.0.1 Index]