forked from andrewssobral/OnlineLRR-ICML2016
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathev_samples_figure_time.m
83 lines (61 loc) · 1.57 KB
/
ev_samples_figure_time.m
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
clear;
config = ev_samples_config();
methods = config.methods_eval;
all_rho = config.rho;
num_rho = length(all_rho);
n = config.n;
num_mth = length(methods);
%% load data
load(config.stat_file_format, 'all_T');
%% figure setting
colors = {'r', 'b', 'g', 'm', 'k', 'k'};
shapes = {'o', 'x', 's', '', '>', ''};
lines = {'', '', '', '--', '', '-'};
x = 1:num_rho;
line_w = 3;
markersz = 14;
strleg = cell(1, num_mth);
for i=1:num_mth
strleg{i} = upper(methods{i});
end
%% figure
figure;
mean_y = zeros(num_mth, num_rho);
for m=1:num_mth
mean_y(m, :) = (all_T(:, m))' / 60; % time unit as minute
end
hold on;
grid on;
box on;
for m=1:num_mth
plot(-5000, -5000, [colors{m} lines{m} shapes{m}], 'linewidth', line_w, 'markersize', markersz);
end
% mark
for m=1:num_mth
if strcmp(shapes{m}, '')
continue;
end
plot(mean_y(m, :), [colors{m} shapes{m}], 'linewidth', line_w, 'markersize', markersz);
end
% line
for m=1:num_mth
if strcmp(lines{m}, '')
continue;
end
plot(mean_y(m, :), [colors{m}, lines{m}], 'linewidth', line_w);
end
ftsize = 26;
set(gca, 'fontsize', ftsize);
xlabel('Corruption \fontsize{26}\rho');
ylabel('Time (min)');
set(gca, 'xticklabel', all_rho);
set(gca, 'ytick', [5:5:35]);
xlim([1, num_rho]);
hlg = legend(strleg, 'Location','SouthEast');
set(hlg, 'fontsize', 14);
hold off;
% fig_name = sprintf(config.fig_file_time);
% saveas(gcf, fig_name, 'fig' );
%
% eps_name = sprintf(config.eps_file_time);
% saveas(gcf, eps_name, 'psc2' );