IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
draw_loadings.m File Reference

Detailed Description

Draws loadings curves with many options.

Definition in file draw_loadings.m.

Go to the source code of this file.

Functions

function draw_loadings (in x, in L, in x_hint, in hint, in legends, in flag_abs, in peakd, in flag_trace_minalt, in flag_draw_peaks, in flag_print_peaks, in flag_histogram, in flag_envelope, in colors)
 

Function Documentation

function draw_loadings ( in  x,
in  L,
in  x_hint,
in  hint,
in  legends,
in  flag_abs,
in  peakd,
in  flag_trace_minalt,
in  flag_draw_peaks,
in  flag_print_peaks,
in  flag_histogram,
in  flag_envelope,
in  colors 
)
Parameters
x[nf] x-axis values.
L[nf][number_of_loadings] loadings matrix.
x_hint=[]. [nf] x-axis values. If not passed or empty, uses x if hint is passed.
hint[nf] "hint" curve that helps the reading of the loadings. If not passed or empty, no hint curve is drawn.
legends=[] One legend per loadings curve. If not passed, no legend is drawn.
flag_abs=0 Whether to take the absolute value of the loadings matrix.
peakd=[] Peak Detector object.
flag_trace_minalt=0 Whether to draw the threshold line. Only works if threshold is passed.
flag_draw_peaks=0 Whether to mark the detected peaks in the figure.
flag_print_peaks=0 Whether to print detected peaks on the command line window.
flag_histogram=0 Whether to plot line or histogram.
flag_envelope=0 If true, will detect all peaks, do spline interpolation and plot this instead
colors=[1, 2, 3...]. See the possibilities:
  • [] : Defaults to sequential color indexes [1, 2, 3...]
  • 1-D vector : interpreted as color indexes (arguments to find_color.m)
  • cell : interpreted as a cell of colours