DrawSignal: Draw Signals

Description Usage Arguments Details Author(s) See Also Examples

View source: R/DrawSignal.R

Description

Depending on the subtype, will draw the different parts of the complex FIDs/spectra.

Usage

1
2
3
4
5
DrawSignal(Signal_data, subtype = c("stacked", "together", "separate", 
           "diffmean", "diffmedian", "diffwith"), ReImModArg = c(TRUE, 
           FALSE, FALSE, FALSE), vertical = TRUE , xlab = "index", 
           RowNames = NULL, row = 1, num.stacked = 4, main = NULL, 
           createWindow)

Arguments

Signal_data

Matrix containing the FIDs or spectra, one line per FID/spectrum.

subtype

Specifies the drawing array:

together

Plots all the signals in the same plot.

separate

Plots each signal on a different page.

stacked

Plots num.stacked signals on stacked plots with the same x-axis.

diffmean

Plots all the signals in the same plot but subtracted by their mean at each point.

diffmedian

Plots all the signals in the same plot but subtracted by their median at each point.

diffwith

Plots all the signals in the same plot but subtracted by the row^th signal at each point.

ReImModArg

Specifies which of the real, imaginary, modulus, or argument part of the complex signal has to be plotted. Those plots are on the same page.

vertical

Specifies whether the parts of the complex signal have to be put vertically or horizontally on the page if there are only 2 parts. If more, there will be 2 horizontally and 2 vertically anyway.

xlab

Label of the x-axis.

RowNames

Strings to use instead of the rownames as labels for the plots if subtype = "separate". It should be a vector of the same length than the number of FIDs.

row

row to be compared to if the subtype is "diffwith".

num.stacked

Number of stacked plots if subtype is "stacked".

main

If not NULL, the main title when subtype is different from "separate".

createWindow

If TRUE, will open a new window.

Details

Don't call this function directly but rather call Draw to specify how the plot will be outputted.

Author(s)

BenoƮt Legat & Manon Martin

See Also

See also Draw and DrawPCA.

Examples

1
2
3
4
5
require(PepsNMRData)
plots <- DrawSignal(FinalSpectra_HS[1:4,], subtype = "together",
            ReImModArg = c(TRUE, TRUE, FALSE, FALSE), createWindow = TRUE)

grid::grid.draw(plots)

ManonMartin/PEPSNMR documentation built on Nov. 26, 2021, 8:45 p.m.