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-17 19:41:20.27 Starting deconvolution of 4 spectra using 1 worker
#> 2025-09-17 19:41:20.27 Starting deconvolution of sim_01
#> 2025-09-17 19:41:20.28 Removing water signal
#> 2025-09-17 19:41:20.28 Removing negative signals
#> 2025-09-17 19:41:20.28 Smoothing signals
#> 2025-09-17 19:41:20.28 Starting peak selection
#> 2025-09-17 19:41:20.28 Detected 314 peaks
#> 2025-09-17 19:41:20.28 Detected 314 peaks
#> 2025-09-17 19:41:20.28 Removing peaks with low scores
#> 2025-09-17 19:41:20.28 Removed 287 peaks
#> 2025-09-17 19:41:20.28 Initializing Lorentz curves
#> 2025-09-17 19:41:20.28 MSE at peak tiplet positions: 4.0838805770844048836921
#> 2025-09-17 19:41:20.28 Refining Lorentz Curves
#> 2025-09-17 19:41:20.28 MSE at peak tiplet positions: 0.1609359876216345797140
#> 2025-09-17 19:41:20.29 MSE at peak tiplet positions: 0.0228015051613790313556
#> 2025-09-17 19:41:20.29 MSE at peak tiplet positions: 0.0071638016610617799920
#> 2025-09-17 19:41:20.29 Formatting return object as decon2
#> 2025-09-17 19:41:20.30 Finished deconvolution of sim_01
#> 2025-09-17 19:41:20.30 Starting deconvolution of sim_02
#> 2025-09-17 19:41:20.30 Removing water signal
#> 2025-09-17 19:41:20.30 Removing negative signals
#> 2025-09-17 19:41:20.30 Smoothing signals
#> 2025-09-17 19:41:20.30 Starting peak selection
#> 2025-09-17 19:41:20.30 Detected 316 peaks
#> 2025-09-17 19:41:20.30 Detected 316 peaks
#> 2025-09-17 19:41:20.30 Removing peaks with low scores
#> 2025-09-17 19:41:20.30 Removed 286 peaks
#> 2025-09-17 19:41:20.30 Initializing Lorentz curves
#> 2025-09-17 19:41:20.30 MSE at peak tiplet positions: 3.8338943428876719465848
#> 2025-09-17 19:41:20.31 Refining Lorentz Curves
#> 2025-09-17 19:41:20.31 MSE at peak tiplet positions: 0.1289481941626757499630
#> 2025-09-17 19:41:20.31 MSE at peak tiplet positions: 0.0135651899090413786964
#> 2025-09-17 19:41:20.31 MSE at peak tiplet positions: 0.0025556755331531087749
#> 2025-09-17 19:41:20.31 Formatting return object as decon2
#> 2025-09-17 19:41:20.32 Finished deconvolution of sim_02
#> 2025-09-17 19:41:20.32 Starting deconvolution of sim_03
#> 2025-09-17 19:41:20.32 Removing water signal
#> 2025-09-17 19:41:20.32 Removing negative signals
#> 2025-09-17 19:41:20.32 Smoothing signals
#> 2025-09-17 19:41:20.32 Starting peak selection
#> 2025-09-17 19:41:20.32 Detected 333 peaks
#> 2025-09-17 19:41:20.32 Detected 333 peaks
#> 2025-09-17 19:41:20.32 Removing peaks with low scores
#> 2025-09-17 19:41:20.32 Removed 308 peaks
#> 2025-09-17 19:41:20.32 Initializing Lorentz curves
#> 2025-09-17 19:41:20.33 MSE at peak tiplet positions: 1.4917065120183623516681
#> 2025-09-17 19:41:20.33 Refining Lorentz Curves
#> 2025-09-17 19:41:20.33 MSE at peak tiplet positions: 0.0569971157280155932279
#> 2025-09-17 19:41:20.33 MSE at peak tiplet positions: 0.0065629979536274852397
#> 2025-09-17 19:41:20.34 MSE at peak tiplet positions: 0.0013913916281140725414
#> 2025-09-17 19:41:20.34 Formatting return object as decon2
#> 2025-09-17 19:41:20.34 Finished deconvolution of sim_03
#> 2025-09-17 19:41:20.34 Starting deconvolution of sim_04
#> 2025-09-17 19:41:20.34 Removing water signal
#> 2025-09-17 19:41:20.34 Removing negative signals
#> 2025-09-17 19:41:20.34 Smoothing signals
#> 2025-09-17 19:41:20.35 Starting peak selection
#> 2025-09-17 19:41:20.35 Detected 325 peaks
#> 2025-09-17 19:41:20.35 Detected 325 peaks
#> 2025-09-17 19:41:20.35 Removing peaks with low scores
#> 2025-09-17 19:41:20.35 Removed 299 peaks
#> 2025-09-17 19:41:20.35 Initializing Lorentz curves
#> 2025-09-17 19:41:20.35 MSE at peak tiplet positions: 2.2382155282476525748336
#> 2025-09-17 19:41:20.35 Refining Lorentz Curves
#> 2025-09-17 19:41:20.35 MSE at peak tiplet positions: 0.0843491698981613247099
#> 2025-09-17 19:41:20.35 MSE at peak tiplet positions: 0.0101688144550079444944
#> 2025-09-17 19:41:20.36 MSE at peak tiplet positions: 0.0031861616084395915326
#> 2025-09-17 19:41:20.36 Formatting return object as decon2
#> 2025-09-17 19:41:20.36 Finished deconvolution of sim_04
#> 2025-09-17 19:41:20.36 Finished deconvolution of 4 spectra in 0.087 secs
plot_spectra(obj)