powered by
plot_peak plots peaks on a chromatograph plot.
plot_peak
plot_peak( peaks, data, title = "Intensity with Peaks", circlecolor = "red", circlesize = 5 )
A ggplot object. A plot of the chromatogram heatmap, with identified peaks circled in red.
a data.frame object. A data frame with 4 columns (Time, X, Y, Peak), ideally the output from either thr_peaks() or top_peaks().
a list object. Data extracted from a cdf file, ideally the output from extract_data(). Provides the background GCxGC plot, created with plot_chr().
a string object. Title placed at the top of the plot. Default title "Intensity with Peaks".
a string object. The desired color of the circles which indicate the peaks. Default color red.
a double object. The size of the circles which indicate the peaks. Default size 5.
This function circles the identified peaks in a sample over a chromatograph plot (ideally smoothed) using ggplot from ggplot2 package ggplot2gcxgclab.
ggplot
file1 <- system.file("extdata","sample1.cdf",package="gcxgclab") frame <- extract_data(file1,mod_t=.5) peaks <- top_peaks(frame$TIC_df, 5) plot_peak(peaks, frame, title="Top 20 Peaks")
Run the code above in your browser using DataLab