Plot a set of deconvoluted spectra.
Arguments
- obj
An object of type
decons0
,decons1
ordecons2
. For details see Metabodecon Classes.- ...
Additional arguments passed to the conversion function.
- sfy
Scaling factor for the y-axis.
- xlab
Label for the x-axis.
- ylab
Label for the y-axis.
- mar
A numeric vector of length 4, which specifies the margins of the plot.
- lgd
Logical. If TRUE, a legend is drawn.
See also
plot_spectrum()
for a much more sophisticated plotting routine
suitable for plotting a single spectrum.
Examples
obj <- deconvolute(sim[1:4], sfr = c(3.55, 3.35))
#> 2025-09-14 15:40:53.74 Starting deconvolution of 4 spectra using 1 worker
#> 2025-09-14 15:40:53.74 Starting deconvolution of sim_01
#> 2025-09-14 15:40:53.74 Removing water signal
#> 2025-09-14 15:40:53.74 Removing negative signals
#> 2025-09-14 15:40:53.74 Smoothing signals
#> 2025-09-14 15:40:53.75 Starting peak selection
#> 2025-09-14 15:40:53.76 Detected 314 peaks
#> 2025-09-14 15:40:53.76 Removing peaks with low pscores
#> 2025-09-14 15:40:53.76 Removed 287 peaks
#> 2025-09-14 15:40:53.76 Initializing Lorentz curves
#> 2025-09-14 15:40:53.76 MSE at peak tiplet positions: 4.0838805770844048836921
#> 2025-09-14 15:40:53.76 Refining Lorentz Curves
#> 2025-09-14 15:40:53.76 MSE at peak tiplet positions: 0.1609359876216345797140
#> 2025-09-14 15:40:53.77 MSE at peak tiplet positions: 0.0228015051613790313556
#> 2025-09-14 15:40:53.77 MSE at peak tiplet positions: 0.0071638016610617799920
#> 2025-09-14 15:40:53.77 Formatting return object as decon2
#> 2025-09-14 15:40:53.78 Finished deconvolution of sim_01
#> 2025-09-14 15:40:53.78 Starting deconvolution of sim_02
#> 2025-09-14 15:40:53.78 Removing water signal
#> 2025-09-14 15:40:53.78 Removing negative signals
#> 2025-09-14 15:40:53.78 Smoothing signals
#> 2025-09-14 15:40:53.78 Starting peak selection
#> 2025-09-14 15:40:53.80 Detected 316 peaks
#> 2025-09-14 15:40:53.80 Removing peaks with low pscores
#> 2025-09-14 15:40:53.80 Removed 286 peaks
#> 2025-09-14 15:40:53.80 Initializing Lorentz curves
#> 2025-09-14 15:40:53.80 MSE at peak tiplet positions: 3.8338943428876719465848
#> 2025-09-14 15:40:53.80 Refining Lorentz Curves
#> 2025-09-14 15:40:53.80 MSE at peak tiplet positions: 0.1289481941626757499630
#> 2025-09-14 15:40:53.80 MSE at peak tiplet positions: 0.0135651899090413786964
#> 2025-09-14 15:40:53.80 MSE at peak tiplet positions: 0.0025556755331531087749
#> 2025-09-14 15:40:53.80 Formatting return object as decon2
#> 2025-09-14 15:40:53.81 Finished deconvolution of sim_02
#> 2025-09-14 15:40:53.81 Starting deconvolution of sim_03
#> 2025-09-14 15:40:53.81 Removing water signal
#> 2025-09-14 15:40:53.81 Removing negative signals
#> 2025-09-14 15:40:53.81 Smoothing signals
#> 2025-09-14 15:40:53.82 Starting peak selection
#> 2025-09-14 15:40:53.83 Detected 333 peaks
#> 2025-09-14 15:40:53.83 Removing peaks with low pscores
#> 2025-09-14 15:40:53.83 Removed 308 peaks
#> 2025-09-14 15:40:53.83 Initializing Lorentz curves
#> 2025-09-14 15:40:53.83 MSE at peak tiplet positions: 1.4917065120183623516681
#> 2025-09-14 15:40:53.83 Refining Lorentz Curves
#> 2025-09-14 15:40:53.83 MSE at peak tiplet positions: 0.0569971157280155932279
#> 2025-09-14 15:40:53.83 MSE at peak tiplet positions: 0.0065629979536274852397
#> 2025-09-14 15:40:53.84 MSE at peak tiplet positions: 0.0013913916281140725414
#> 2025-09-14 15:40:53.84 Formatting return object as decon2
#> 2025-09-14 15:40:53.84 Finished deconvolution of sim_03
#> 2025-09-14 15:40:53.84 Starting deconvolution of sim_04
#> 2025-09-14 15:40:53.84 Removing water signal
#> 2025-09-14 15:40:53.84 Removing negative signals
#> 2025-09-14 15:40:53.84 Smoothing signals
#> 2025-09-14 15:40:53.98 Starting peak selection
#> 2025-09-14 15:40:53.99 Detected 325 peaks
#> 2025-09-14 15:40:53.99 Removing peaks with low pscores
#> 2025-09-14 15:40:54.00 Removed 299 peaks
#> 2025-09-14 15:40:54.00 Initializing Lorentz curves
#> 2025-09-14 15:40:54.00 MSE at peak tiplet positions: 2.2382155282476525748336
#> 2025-09-14 15:40:54.00 Refining Lorentz Curves
#> 2025-09-14 15:40:54.00 MSE at peak tiplet positions: 0.0843491698981613247099
#> 2025-09-14 15:40:54.00 MSE at peak tiplet positions: 0.0101688144550079444944
#> 2025-09-14 15:40:54.00 MSE at peak tiplet positions: 0.0031861616084395915326
#> 2025-09-14 15:40:54.00 Formatting return object as decon2
#> 2025-09-14 15:40:54.01 Finished deconvolution of sim_04
#> 2025-09-14 15:40:54.01 Finished deconvolution of 4 spectra in 0.267 secs
plot_spectra(obj)