-
Notifications
You must be signed in to change notification settings - Fork 0
/
draw_boxplot
46 lines (42 loc) · 1.42 KB
/
draw_boxplot
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
close all;
clear all;
clc;
format short
plot_case = 'Eval';
figure,
set(gcf, 'Position', [100, 100,600,400])
p_value = [];
p2_value = [];
switch plot_case
case 'Eval'
load('eval/eval.mat');
plot_case = strcat(plot_case, ' (%)');
h = boxplot(100*dice, 'Labels', {'A', 'B', 'C', 'D', 'E'}, 'DataLim', [80,100]);
[~, p_value(1)] = ttest(dice(:,1), dice(:,2), 'Tail', 'Right');
[~, p_value(2)] = ttest(dice(:,1), dice(:,3), 'Tail', 'Right');
[~, p_value(3)] = ttest(dice(:,1), dice(:,4), 'Tail', 'Right');
[~, p_value(4)] = ttest(dice(:,1), dice(:,5), 'Tail', 'Right');
[p2_value(1),~] = signrank(dice(:,1), dice(:,2), 'Tail', 'Right');
[p2_value(2),~] = signrank(dice(:,1), dice(:,3), 'Tail', 'Right');
[p2_value(3),~] = signrank(dice(:,1), dice(:,4), 'Tail', 'Right');
[p2_value(4),~] = signrank(dice(:,1), dice(:,5), 'Tail', 'Right');
mean(dice)*100
std(dice)*100
end
format shorte
p_value
p2_value
title(sprintf('Data-%s', plot_case));
set(h, 'LineWidth', 2);
set(gca, 'LineWidth', 3);
set(gca, 'FontSize', 14);
set(gca, 'FontWeight', 'bold');
set(gcf, 'color', 'white');
ax = gca;
outerpos = ax.OuterPosition;
ti = ax.TightInset;
left = outerpos(1) + ti(1);
bottom = outerpos(2) + ti(2);
ax_width = outerpos(3) - ti(1) - ti(3) - 0.01;
ax_height = outerpos(4) - ti(2) - ti(4);
ax.Position = [left+ax_width-0.9 bottom 0.9 ax_height];