View source: R/plotting-functions.R
focusPlot | R Documentation |
This function plots a spectrum ('MassPeaks' or 'MassSpectrum') and provides a focus on a mass range around a given m/z of interest taking into consideration the fwhm at that mass.
focusPlot(x, m, fwhm, sigmalim = 6, col = NULL)
x |
an object of type 'MassPeaks' or 'MassSpectrum'. Either a single spectrum or a mean spectrum (see '?MALDIquant::mergeMassPeaks'). |
m |
a numeric (vector), the m/z value(S) at which to do the plotting. |
fwhm |
a numeric (vector), the fwhm value(s) at 'm', normally generated by 'getFwhm'. Must have the same length as 'm'. |
sigmalim |
an integer, how many sigmas (of the calculated Gaussian) around 'm' should be considered in the plot. Note that the superimposed Gaussian always spans 'm ± sigma'. |
col |
a character (vector), colors used for the m/z values in 'm'. |
a plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.