View source: R/2-functions_graphs.R
nmr_plot_spectra | R Documentation |
Plot NMR spectra, with line-brackets denoting binned regions. Uses spectra data processed in MestreNova or TopSpin.
nmr_plot_spectra(
dat,
binset,
label_position = 100,
mapping = aes(x = ppm, y = intensity),
stagger = 10
)
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 |
A ggplot
object.
Kaizad Patel
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.