focusPlot: Plot a spectrum focusing on a specific mass-range

View source: R/plotting-functions.R

focusPlotR Documentation

Plot a spectrum focusing on a specific mass-range

Description

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.

Usage

focusPlot(x, m, fwhm, sigmalim = 6, col = NULL)

Arguments

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'.

Value

a plot.


CeMOS-Mannheim/moleculaR documentation built on April 14, 2025, 8:27 a.m.