-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrs_boxplots.m
More file actions
56 lines (50 loc) · 1.67 KB
/
Copy pathrs_boxplots.m
File metadata and controls
56 lines (50 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
function bT=rs_boxplots(argIn,output,varargin)
% Boxplots given designs for the output of interest.
% Resul Al
if nargin<2, output='OCI'; end
if nargin<1, argIn=1:100; end
if isnumeric(argIn), argIn = strseq('design',argIn); end
bigS = rs_getS;
bigT = table;
for i = 1:length(argIn)
designi = argIn{i};
try
% T(logical(round(T.Methane)),:)
T = bigS.(designi);
R = ResultsTable(T);
T = R.filterzeromethane(T);
T = R.filterminusSNH(T);
T = R.filterinfeasible(T,'SNH',5);
% T = T(T.TN<10,:);
% T = T(T.SNH<1,:);
% T = T(T.COD<100,:);
A = T.(output);
% A = bigS.(designi).(output);
A(A==0) = NaN; % treat the zerolines
% A(round(A)==0,:) = NaN; % treat the zerolines
% T = addSolutionID(R,sscanf(designi,'design%d'));
catch
% disp([designi ' is missing. It is skipped!.'])
continue
end
T = table;
T.Output = A;
T.BoxplotLabel = string(repmat(['Design ' erase(designi,'design')],length(A),1));
bigT = [bigT; T];
end
if length(argIn)>10
% bigT.BoxplotLabel = erase(bigT.BoxplotLabel,'design');
ang=45;
else
ang=0;
end
if nargout==1; bT=bigT; end
boxplot(bigT.Output,bigT.BoxplotLabel, 'Whisker',1.5, varargin{:}) % 'PlotStyle','compact',
xlabel('Designs')
ylabel(output)
xtickangle(ang);
line([0,100],[0,0],'LineWidth',2,'Color','red')
% ax1=gca;
% ax2 = axes('Position',ax1.Position,...
% 'XAxisLocation','top')
end