drawSpec: Spectral plot

View source: R/drawSpec.R

drawSpecR Documentation

Spectral plot

Description

This function allows to draw a segment or the whole spectra with limited high/low bounds of intensity.

Usage

drawSpec(
  X,
  startP = -1,
  endP = -1,
  groupLabel = NULL,
  useLog = -1,
  highBound = -1,
  lowBound = -1,
  xlab = NULL,
  ylab = NULL,
  main = NULL,
  nAxisPos = 4,
  offside = 0
)

Arguments

X

The spectral dataset in matrix format in which each row contains a single sample.

startP

The starting point of the segment. If it is -1, the starting point is from beginning of the spectra.

endP

The ending point of the segment. If it is -1, the ending point is the last point of the spectra.

groupLabel

The default value is NULL, it means that a single spectrum has a distinct color. Otherwise, the spectra is colored by their label.

useLog

The default value is -1, that means do not use a log transformation. If users want to transform the intensities to logarit values before plotting, set it to 1.

highBound

Default value is -1, that means the plot covers also the highest intensity peaks in the figure. If the users want to limit the upper height of the figure, set this parameter by the limited value.

lowBound

Default value is -1, that means the plot covers also the lowest intensity peaks in the figure. If the users want to limit the under height of the figure, set this parameter by the limited value.

xlab

The default value is NULL, if so, "index" is displayed at the horizontal axis.

ylab

The default value is NULL, if so, "intensity" is displayed at the vertical axis.

main

The default value is NULL, if so, the title shows the values of startP and endP.

nAxisPos

The number of ticks that you want to display in horizontal axis.

offside

The offside of values in x-axis for display.

Value

Return a plot of the spectra.

Author(s)

Trung Nghia Vu

See Also

drawBW

Examples

 res=makeSimulatedData();
 X=res$data;
 groupLabel=res$label;
 drawSpec(X)


speaq documentation built on May 23, 2022, 5:06 p.m.