plotNMR: A function for plotting NMR spectra.

View source: R/mrbin.R

plotNMRR Documentation

A function for plotting NMR spectra.

Description

This function plots the current NMR spectrum. If no parameters are provided, parameters are read from the mrbin.env environment variables, set by mrbin. To change the plot, use zoom(), zoomIn(), zoomOut(), intPlus(), intMin(), left(), right(). For 2D data use additionally: contMin(), contPlus(), up(), down()

Usage

plotNMR(
  region = NULL,
  rectangleRegions = NULL,
  rectangleColors = c("green", "orange", "blue", "red", "yellow", "gray", "purple"),
  rectangleFront = FALSE,
  polygonRegion = NULL,
  color = NULL,
  add = FALSE,
  showGrid = FALSE,
  manualScale = TRUE,
  plotTitle = "",
  restrictToRange = FALSE,
  currentSpectrumOriginal = NULL,
  perspective = FALSE,
  noise = NULL,
  dimension = NULL,
  plotDelay = 0.1
)

Arguments

region

A vector defining the plot region (left, right, top, bottom)

rectangleRegions

A 4-column matrix defining areas where to plot rectangles

rectangleColors

Define colors for the rectangles

rectangleFront

Plot rectangles in front of spectrum rather than in background (only 2D)

polygonRegion

Defines 4 corners of a polygon to be plotted

color

Defines the color of the spectrum plot. If NULL, a rainbow theme is used for 2D NMR

add

If TRUE, additional spectrum plots are overlaid with the current plot

showGrid

Shows a grid of data points. Defaults to FALSE

manualScale

If TRUE, scaling factor is taken from environment variables

plotTitle

Defines the main title of the plot

restrictToRange

Restrict plot area to range of available data points. Defaults to FALSE

currentSpectrumOriginal

Optional spectral data. If omitted, data from the environment variables is used

perspective

If TRUE, a perspective plot will be displayed for 2D data instead of the regular topographic view

noise

If provided, a line or plane at this level will be added to the plot to indicate noise level

dimension

"1D' or "2D". If not provided, this will be deduced from the data

plotDelay

Add a small delay in seconds to force RStudio to update plots

Value

None

Examples

mrbin(silent=TRUE,setDefault=TRUE,parameters=list(dimension="1D",binwidth1D=.1,
         PQNScaling="No",noiseRemoval="No",trimZeros="No",tryParallel=TRUE,
         fixNegatives="No",logTrafo="No",PCA="No",verbose=TRUE,
         NMRfolders=system.file("extdata/1/10/pdata/10",package="mrbin")))
plotNMR()

mrbin documentation built on June 22, 2024, 9:39 a.m.