IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
vis_log_ovrcurves.m
Go to the documentation of this file.
1 %> @brief Visualization of Grades Curves stored inside a log_ovrcurves object
3  properties
4  %> (optional) Hint dataset. Used to plot a black dashed thin spectrum line on the background
5  data_hint = [];
6  %> =0. Whether to trace a dashed horizontal line to show a minimum altiture threshold from the @c peakdetector
7  %>
8  %> This property is only used if the @pc peakdetector has been specified
9  flag_trace_minalt = 0;
10  %> =0. Whether to take the abs() of the of the loadings
11  flag_abs = 0;
12  %> =[]. Peak detector to mark peaks in the Loadings and Peak Location plots
14  %> =0. Loadings Envelope mode. When loadings are very spiky, this can be set to =1 to merge adjacent peaks with a thicker line.
15  %>
16  %> This only takes effect if @c flag_bmtable is 0
17  flag_envelope = 0;
18  %> =0. Activates the "Peak Location Plot" mode
19  flag_bmtable = 0;
20  end;
21 
22  methods
23  function o = vis_log_ovrcurves(o) %#ok<INUSD>
24  o.classtitle = 'Feature grades (multiple curves)';
25  o.inputclass = 'log_ovrcurves';
26  o.flag_params = 1;
27  end;
28  end;
29 
30  methods(Access=protected)
31  function out = do_use(o, log)
32  out = [];
33 
34  flag_p = ~isempty(o.peakdetector);
35  if ~isempty(o.data_hint)
36  hintx = o.data_hint.fea_x;
37  hinty = mean(o.data_hint.X, 1);
38  else
39  hintx = [];
40  hinty = [];
41  end;
42 
43  % Eliminates the color index corresponding to the reference class
44  % This will synchonize colors with other plots that plot data from the
45  % reference class.
46  colorindexes = 1:size(log.gradess, 1)+1;
47  colorindexes(log.idx_ref) = [];
48 
49 
50  if ~o.flag_bmtable
51  draw_loadings(log.fea_x, log.gradess', hintx, hinty, log.legends, o.flag_abs, ...
52  o.peakdetector, o.flag_trace_minalt, flag_p, flag_p, 0, o.flag_envelope, colorindexes);
53  format_yaxis(log);
54  else
55  draw_loadings_pl(log.fea_x, log.gradess', hintx, hinty, log.legends, o.flag_abs, ...
56  o.peakdetector, colorindexes);
57  end;
58  set_title(o.classtitle, log);
59  format_xaxis(log);
60  make_box();
61  end;
62  end;
63 end
function make_box()
Stores set of grades as a matrix.
Definition: log_ovrcurves.m:4
Peak Detector.
Definition: peakdetector.m:6
Visualization base class.
Definition: vis.m:4
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)
Property classtitle
Class Title. Should have a descriptive name, as short as possible.
Definition: irobj.m:50
Visualization of Grades Curves stored inside a log_ovrcurves object.
function format_yaxis(in par)
function set_title(in s, in obj)
function draw_loadings_pl(in x, in L, in x_hint, in hint, in legends, in flag_abs, in peakd, in colorindexes)
function format_xaxis(in par)