nmr_plot_spectra {nmrrr} | R Documentation |
Plot NMR spectra
Description
Plot NMR spectra, with line-brackets denoting binned regions. Uses spectra data processed in MestreNova or TopSpin.
Usage
nmr_plot_spectra(
dat,
binset,
label_position = 100,
mapping = aes(x = ppm, y = intensity),
stagger = 10
)
Arguments
dat |
Processed spectral data, output from (a) |
binset |
A binset; e.g. |
label_position |
y-axis position for bin labels |
mapping |
An aesthetic mapping generated by |
stagger |
How much to stagger the labels, numeric;
same units as |
Value
A ggplot
object.
Author(s)
Kaizad Patel
Examples
sdir <- system.file("extdata", "kfp_hysteresis", "spectra_mnova", package = "nmrrr")
spec <- nmr_import_spectra(path = sdir, method = "mnova")
library(ggplot2)
p_aes <- aes(x = ppm, y = intensity)
p <- nmr_plot_spectra(spec, bins_Clemente2012, 5, p_aes, stagger = 0.5)
p + ylim(0, 6)
[Package nmrrr version 1.0.0 Index]