plot.XY: Plotting an XY object

Description Usage Arguments Details Examples

View source: R/plotting.R

Description

plot.XY is designed to provide easy, adaptable plots of an XRPD pattern.

Usage

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

Arguments

x

an XY 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.

xlim

A numeric vector providing limits of the x-axis (E.g. c(10, 60)). Defaults to full x-axis unless specified.

normalise

Logical. If TRUE then count intensities will be normalised to a minimum of zero and maximum of 1. Default = FALSE.

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

1
2
3
4
5
6
7
# Load the minerals library
data(rockjock_mixtures)
## Not run: 
plot(rockjock_mixtures$Mix1, wavelength = "Cu")
plot(rockjock_mixtures$Mix1, wavelength = "Cu", interactive = TRUE)

## End(Not run)

powdR documentation built on Aug. 13, 2021, 5:08 p.m.