Learn R Programming

powdR (version 1.1.0)

plot.powdRafps: Plotting elements of a powdRafps object

Description

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

Usage

# S3 method for powdRafps
plot(x, wavelength, 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.

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

The only mandatory argument is x, which must be a powdRlib object. When seeking to inspect the results from full pattern summation, interactive plots are particularly useful and can be specified with the interactive argument.

Examples

Run this code
# NOT RUN {
#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)

# }

Run the code above in your browser using DataLab