-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathget_line_properties_templates.m
103 lines (101 loc) · 2.96 KB
/
get_line_properties_templates.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
function [slines] = get_line_properties_templates(uid, style)
%GET_LINE_PROPERTIES_TEMPLATES Returns line properties for plots
% [slines] = GET_LINE_PROPERTIES_TEMPLATES(uid, style)
% returns line properties for plots of template attack results.
%
% This method may be useful to get consitent line properties for each
% compression method and parameters so that plots with same parameters
% may use the same color, width, etc.
%
% uid should be an integer that uniquely identifies the desired line
% properties. This could be used to make sure that the same properties
% are used across different figures. This method currently supports only
% the integers from 1 to 6.
%
% slines is a structure containing the following information:
% - 'Color'
% - 'LineStyle'
% - 'LineWidth'
% - 'Marker'
%
% style is a string that specifies a kind of style, that may change the
% properties returned. Currently supported styles are:
% - 'normal'
% - 'fancy'
%
% The slines structure can be used with make_figures_ge to use the
% selected properties.
%
% Author: Omar Choudary ([email protected])
if strcmp(style, 'normal')
if uid == 1
slines.Color = 'm';
slines.LineStyle = '-';
slines.LineWidth = 4;
slines.Marker = 'none';
elseif uid == 2
slines.Color = 'c';
slines.LineStyle = '-.';
slines.LineWidth = 4;
slines.Marker = 'none';
elseif uid == 3
slines.Color = 'g';
slines.LineStyle = '-';
slines.LineWidth = 4;
slines.Marker = 'none';
elseif uid == 4
slines.Color = 'k';
slines.LineStyle = '-.';
slines.LineWidth = 4;
slines.Marker = 'none';
elseif uid == 5
slines.Color = 'b';
slines.LineStyle = '-';
slines.LineWidth = 4;
slines.Marker = 'none';
elseif uid == 6
slines.Color = 'r';
slines.LineStyle = '-.';
slines.LineWidth = 4;
slines.Marker = 'none';
else
error('uid not supported');
end
elseif strcmp(style, 'fancy')
if uid == 1
slines.Color = 'm';
slines.LineStyle = '-';
slines.LineWidth = 2;
slines.Marker = 'o';
elseif uid == 2
slines.Color = 'c';
slines.LineStyle = '--';
slines.LineWidth = 2;
slines.Marker = '+';
elseif uid == 3
slines.Color = 'g';
slines.LineStyle = '-.';
slines.LineWidth = 2;
slines.Marker = '*';
elseif uid == 4
slines.Color = 'k';
slines.LineStyle = '-';
slines.LineWidth = 2;
slines.Marker = '.';
elseif uid == 5
slines.Color = 'b';
slines.LineStyle = '--';
slines.LineWidth = 2;
slines.Marker = 'x';
elseif uid == 6
slines.Color = 'r';
slines.LineStyle = '-.';
slines.LineWidth = 2;
slines.Marker = 's';
else
error('uid not supported');
end
else
error('Unknown style');
end
end