showALSresult {alsace} | R Documentation

## Plot ALS results in a more elaborate way

### Description

Simultaneous visualization of pure components (spectra and time profiles) and either raw data, fitted data or residuals.

### Usage

    showALSresult(xals, xlst,
                  tp = getTime(xals), wl = getWavelength(xals),
                  mat.idx = 1:length(xlst),
                  img.col = terrain.colors(10), zlim, xlab, ylab,
                  compound.col = 1:ncol(xals$S), logsc = TRUE,
                  plotPureC = c("both", "spec", "conc", "none"),
                  titles, annotation = show.img,
                  PureChght = 0.33, PureCwdth = min(nplot, 5)/5 - 0.1,
                  show.img = TRUE)

### Arguments

`xals` | The fitted ALS object. Not needed if `plotPureC` equals `"none"`: in that case only the data are shown.
`xlst` | The data: the list of matrices on which the ALS object is based.
`tp` | Optional vector of time points. If missing, will be determined using function `getTime`.
`wl` | Optional vector of wavelengths. If missing, will be determined using function `getWavelength`.
`mat.idx` | Indices of the samples to be visualized.
`img.col` | Color vector for `image`.
`zlim` | Range of the image colors.
`xlab, ylab` | Axis annotation strings.
`compound.col` | Colors to be used for components in the pure specta/profile plots.
`logsc` | Logical, indicating whether the images should be logscaled vefore visualization. Default: TRUE.
`plotPureC` | Determines which part (if any) of the pure components is shown.
`titles` | Titles for the plots for the individual samples. If not given, the names of the `xlst` elements will be used.
`annotation` | if a text string, this will be shown in the top right corner panel. If anything else but FALSE, a color bar will be drawn. The default is to show the color bar for images and not to show it for contour plots.
`PureChght` | Height, relative to the height of the data panels, of the top row of pure concentration profiles
`PureCwdth` | Width, relative to the width of the data panels, of the right column of pure spectra
`show.img` | logical, indicating whether `image` is used (the default) or `contour`

### Author(s)

Ron Wehrens

### See Also

`plot.ALS`

### Examples

    data(teaMerged)

    ncomp <- ncol(teaMerged$S)
    myPalette <- colorRampPalette(c("black", "red", "blue", "green"))
    mycols <- myPalette(ncomp)

    maxResid <- max(abs(range(teaMerged$resid)))
    showALSresult(teaMerged, teaMerged$resid,
                  compound.col = mycols, logsc = FALSE, img.col = cm.colors(9),
                  mat.idx = 2:4, zlim =c(-maxResid, maxResid))

[Package alsace version 1.26.0 Index]