Plot sample data, linear combination fit and residual spectrum
This function allows plotting (png or tiff image files) of the corrected sample spectrum, the linear combination fit and the residual.
plot_LCF(all.samples, all.standards, LCF.res, LC.vals, corr.norm, float = NULL, exclude = NULL, use.tiff = NULL, E.zero = NULL, set.plot.ymax = NULL, file.output = NULL)
all.samples
: List of all samplesall.standards
: List of all standardsLCF.res
: Results from function fit_float()LC.vals
: The fitting range values for the linear combination fittingcorr.norm
: Vector of the base-line correction and edge-step normalization values (vector of length 4)float
: Logical, default to FALSEexclude
: Logical, default to FALSEuse.tiff
: Logical, default to FALSEE.zero
: Set E0, defaults to NULLset.plot.ymax
: Set maximum of plot y axis, defaults to NULLfile.output
: Logical, default to FALSEdata(stdmix) corr.spec.standards <- initial_load(specdat[1:4], corr.norm = c(-36, -15, 37, 58)) corr.spec.samples <- initial_load(specdat[5:8], corr.norm = c(-36, -15, 37, 58)) param.float <- expand.grid(pre.adj.1 = seq(-45,-30,5), pre.adj.2 = seq(-19,-9,5), post.adj.1 = seq(34,40,2), post.adj.2 = seq(50,65,5)) float.fit <- fit_float(all.samples = corr.spec.samples[1], all.standards = corr.spec.standards, LC.vals = c(-14, 46), float = param.float, ex.smaller = 0.05) par(pty="s") plot_LCF(all.samples = corr.spec.samples[1], all.standards = corr.spec.standards, LCF.res = float.fit[1,], LC.vals = c(-14,46), corr.norm = c(-36, -15, 37, 58))
Useful links