IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
drawer_histograms.m
Go to the documentation of this file.
1 % @todo This is the only place where rank-wise histograms are drawn as lines. I had to deactivate this to simplify things. In the future, a "vis_rankwisehists" could be created
2 % %> @ingroup graphicsapi
3 % %> @brief Draws 2 subplots, one with individual rank-wise hits, and on the right, a histogram using given subsetsprocessor
4 % %>
5 % %> This class is auxiliary for report generation
6 % classdef drawer_histograms
7 % properties
9 % % subsetsprocessor_fixed;
11 % flag_legends = 0;
12 % end;
13 %
14 % methods
15 % %> 3 subplots
16 % %> @param log log_fselrepeater
17 % function hist = draw(o, log)
18 % ds_hint = load_data_hint();
19 %
20 %
21 % % First shows the individual individual per-selection-order histograms as lines overlapping each other
22 % ssp = subsetsprocessor(); %#ok<CPROP,PROP>
23 % hist = ssp.use(log);
24 %
25 % subplot(1, 2, 1);
26 % hist.draw_as_lines();
27 % % title('Individual histograms');
28 % xlabel(''); ylabel('');
29 % freezeColors();
30 % if ~o.flag_legends; legend off; end;
31 % set(gca, 'outerposition', [0, 0.03, .48, .97])
32 % set(gca, 'color', 1.15*[0.8314 0.8157 0.7843]);
33 %
34 %
35 %
36 % % Second plot is a stacked histogram calculated using the subsetsprocessor
37 % ssp = def_subsetsprocessor(o.subsetsprocessor);
38 % hist = ssp.use(log);
39 %
40 % subplot(1, 2, 2);
41 % hist.draw_stackedhists(ds_hint, {[], .8*[1 1 1]}, def_peakdetector(o.peakdetector));
42 % % title(sprintf('# informative features: %d', hist.nf4grades));
43 % xlabel(''); ylabel('');
44 % freezeColors();
45 % if ~o.flag_legends; legend off; end;
46 % set(gca, 'outerposition', [.5, 0.03, .48, 0.97]);
47 % set(gca, 'color', 1.15*[0.8314 0.8157 0.7843]);
48 %
49 %
50 % set(gcf, 'InvertHardCopy', 'off'); % This is apparently needed to preserve the gray background
51 % set(gcf, 'color', [1, 1, 1]);
52 % end;
53 %
54 % %> 3 subplots
55 % %> @param log log_fselrepeater
56 % function o = draw_for_legend(o, log)
57 % ds_hint = [];
58 %
59 % ssp = subsetsprocessor(); %#ok<CPROP,PROP>
60 % hist = ssp.use(log);
61 %
62 % % Second plot is a stacked histogram with all features informative
63 % hist.draw_stackedhists(ds_hint, {[], [.8, .8, .8]}, def_peakdetector(o.peakdetector));
64 % freezeColors();
65 % end;
66 % end;
67 % end
Peak Detector.
Definition: peakdetector.m:6
function def_peakdetector(in out)
Generated by fselrepeater, carries subsets of features.
function def_subsetsprocessor(in out)
Processor of a set of subsets of features.
Analysis Session (AS) base class.
Definition: as.m:6
function load_data_hint()