plot.powdRafps: Plotting elements of a powdRafps object

Description Usage Arguments Details Examples

View source: R/plotting.R

Description

plot.powdRafps is designed to provide easy, adaptable plots of full pattern summation outputs produced from afps.

Usage

1
2
## S3 method for class 'powdRafps'
plot(x, wavelength, mode, xlim, interactive, ...)

Arguments

x

a powdRfps 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 of length two providing limits of the x-axis. Defaults to full x-axis unless specified.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#Load the minerals library
data(minerals)

# Load the soils data
data(soils)

## Not run: 
afps_sand <-  afps(lib = minerals,
                   smpl = soils$sandstone,
                   std = "QUA.1",
                   amorphous = "ORG",
                   align = 0.2,
                   lod = 0.1)

plot(afps_sand, wavelength = "Cu")
plot(afps_sand, wavelength = "Cu", interactive = TRUE)


## End(Not run)

benmbutler/powdR documentation built on Sept. 16, 2020, 5:03 a.m.