| plot.powdRlm {powdR} | R Documentation | 
Plotting elements of a powdRlm object
Description
plot.powdRlm is designed to provide easy, adaptable plots
of full pattern summation outputs produced from fps_lm.
Usage
## S3 method for class 'powdRlm'
plot(x, wavelength, mode, xlim, group, show_excluded, interactive, ...)
Arguments
| x | a powdRlm object | 
| wavelength | One of "Cu", "Co" or a custom numeric value defining the wavelength (in Angstroms). Used to compute d-spacings.When "Cu" or "Co" are supplied, wavelengths of 1.54056 or 1.78897 are used, respectively. | 
| mode | One of "fit", "residuals" or "both" defining whether to plot the fitted patterns, the residuals of the fit, or both, respectively. Default = "fit". | 
| xlim | A numeric vector providing limits of the x-axis (E.g.  | 
| group | A logical parameter used to specify whether the plotted data are grouped according to the phase name. Default = FALSE. | 
| show_excluded | A logical value specifying whether the areas excluded from the
fitting are identified in the plot as grey rectangles. Default  | 
| interactive | logical. If TRUE then the output will be an interactive ggplotly object. If FALSE then the output will be a ggplot object. | 
| ... | other arguments | 
Details
When seeking to inspect the results from full pattern summation, interactive
plots are particularly useful and can be specified with the interactive
argument.
Examples
data(rockjock)
data(rockjock_mixtures)
#Compute the PCA and loadings
x1 <- xrpd_pca(rockjock_mixtures,
               mean_center = TRUE,
               bin_size = 1,
               root_transform = 1)
## Not run: 
fps_lm_out <- fps_lm(rockjock,
                     smpl = data.frame("x" = x1$loadings$tth,
                                       "y" = x1$loadings$Dim.1),
                     refs = rockjock$phases$phase_id,
                     std = "QUARTZ",
                     align = 0.3,
                     p = 0.01)
plot(fps_lm_out,
     wavelength = "Cu",
     interactive = TRUE,
     group = TRUE)
## End(Not run)