plotBatmanFitStack: Stack plot Batman Metabolite Fit of NMR Spectra (With Down...

Description Usage Arguments Examples

View source: R/plotBatmanFitStack.R

Description

This function plots the BATMAN fit results in stack, and saves the figure to pdf file in specified directory. User can choose to plot all or some of the spectra analyzed, show the metabolite fit and give a range for x and y limits. The figure file will not be overwritten if it already exists by default. A prefix can be added to the file name for new saves.

Usage

1
2
3
4
5
6
7
plotBatmanFitStack(BM, offset = 1, mirroredWav = TRUE, specNo,  xfrom,  
                   xto, yfrom, yto, listMeta = FALSE, metaName,  
                   saveFig = TRUE, saveFigDir = BM$outputDir,  
                   prefixFig, rerun = FALSE, placeLegend = "topright", 
                   plotColour, overwriteFig = FALSE, 
                   metaLwd = 2, metaLty = 5, orientation = "L",
                   showPlot)

Arguments

BM

batman output data frame.

offset

Offset value for the stack plot.

mirroredWav

Plot mirrored wavelet fit if set TRUE. The default is TRUE

specNo

Vector of spectra ID in the input order to specify which spectra to be plotted in stack plot.

xfrom

The start ppm value to plot. Default is set to the start ppm value of the whole processed range.

xto

The end ppm value to plot. Default is set to the end ppm value of the whole processed range.

yfrom

The start value of vertical axis to plot. Default is set to 0.

yto

The end value of vertical axis to plot. Default is set to the maximum value of the spectrum point in display.

listMeta

Individual metabolite fit will also be shown in the plot if set TRUE. The default is FALSE.

metaName

One or more specified metabolite fits will be shown in the plot. If no name was given and listMeta = TRUE, all the individual metabolite fit will be shown.

saveFig

Save figure to pdf file if set TRUE. The default is TRUE.

saveFigDir

Save figure in this directory. The default is output directory of BM.

prefixFig

Add prefix to each saved figure name. The default is no prefix.

rerun

Set to FALSE to plot batman result, and TRUE to plot batmanrerun result.

placeLegend

Where to place the legend in figure. The default is "topright".

plotColour

User can specify colours for each metabolite if listMeta = TRUE. If not, a set of randomly generated colours will be used.

overwriteFig

Overwrite saved figure file in pdf format if overwriteFig = TRUE. If set to FALSE, a new figure file with system time as postfix will be created. The default is FALSE.

metaLwd

The line widths for metabolite fit.

metaLty

The line types for metabolite fit.

orientation

The orientation of plot, either portrait or landscape, the defult is "L".

showPlot

If set FALSE, no plot will be shown on display, the pdf file(s) for the figure plot(s) will be created in output folder. If missing from input, for windows and osx operating systems, it will be set to TRUE, for the rest operating systems, it will be set to FALSE automatically.

Examples

1
2
3
4
5
6
7
8
library(batman)
## Run BATMAN 
if(interactive()) 
{
bm<-batman()
## then plot results
plotBatmanFitStack(bm)
}

batman documentation built on May 2, 2019, 6:13 p.m.