Learn R Programming

powdR (version 1.3.0)

plot.powdRlib: Plotting elements of a powdRlib object

Description

plot.powdRlib is designed to provide easy, adaptable plots of an XRPD reference library built using the powdRlib constructor function.

Usage

# S3 method for powdRlib
plot(x, wavelength, refs, interactive, ...)

Arguments

x

a powdRlib 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.

refs

a character string of reference pattern id's to be plotted

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

Plots can be made interactive using the logical interactive argument.

Examples

Run this code
# NOT RUN {
# Load the minerals library
data(minerals)
# }
# NOT RUN {
plot(minerals, wavelength = "Cu", refs = "ALB")
plot(minerals, wavelength = "Cu", refs = "ALB", interactive = TRUE)
# }

Run the code above in your browser using DataLab