File data_analysis/@entanglement_evaluation/plotLogneg.m changed (mode: 100644) (index 14e3ba9..9c6be09) |
... |
... |
function fig = plotLogneg(obj, varargin) |
10 |
10 |
physicality_marker = 'ok'; |
physicality_marker = 'ok'; |
11 |
11 |
show_legend = true; |
show_legend = true; |
12 |
12 |
legend_location = 'Best'; |
legend_location = 'Best'; |
|
13 |
|
legend_interpreter = 'none'; |
13 |
14 |
show_grid = false; |
show_grid = false; |
14 |
15 |
mark_maximum = false; |
mark_maximum = false; |
15 |
16 |
mark_optimum = false; |
mark_optimum = false; |
|
... |
... |
function fig = plotLogneg(obj, varargin) |
59 |
60 |
data_labels = varargin{k+1}; |
data_labels = varargin{k+1}; |
60 |
61 |
case {'legend_location', 'legend_position'} |
case {'legend_location', 'legend_position'} |
61 |
62 |
legend_location = varargin{k+1}; |
legend_location = varargin{k+1}; |
|
63 |
|
case {'legend_interpreter', 'legendinterpreter'} |
|
64 |
|
legend_interpreter = varargin{k+1}; |
62 |
65 |
case {'lines', 'show_lines'} |
case {'lines', 'show_lines'} |
63 |
66 |
show_lines = varargin{k+1}; |
show_lines = varargin{k+1}; |
64 |
67 |
case {'line_style', 'linestyle'} |
case {'line_style', 'linestyle'} |
|
... |
... |
function fig = plotLogneg(obj, varargin) |
196 |
199 |
if show_legend |
if show_legend |
197 |
200 |
leg = compactify_legend(leg); |
leg = compactify_legend(leg); |
198 |
201 |
leg = reposition_legend(leg, legend_location); |
leg = reposition_legend(leg, legend_location); |
|
202 |
|
set(leg, 'interpreter', legend_interpreter); |
199 |
203 |
else |
else |
200 |
204 |
legend off |
legend off |
201 |
205 |
end |
end |
File data_analysis/@meta_ev/plot_logneg_versus_gamma.m changed (mode: 100644) (index 233f2c5..321fb61) |
... |
... |
function fig = plot_logneg_versus_gamma(meta, tracepairs_ind, varargin) |
8 |
8 |
subplotnum = 111; |
subplotnum = 111; |
9 |
9 |
show_legend = false; |
show_legend = false; |
10 |
10 |
legend_location = 'Best'; |
legend_location = 'Best'; |
|
11 |
|
legend_title = []; |
11 |
12 |
legend_title_maxlength = inf; |
legend_title_maxlength = inf; |
12 |
13 |
legend_postfix = ''; |
legend_postfix = ''; |
13 |
14 |
legend_number_parser = @num2eng; |
legend_number_parser = @num2eng; |
14 |
15 |
only_physical = false; |
only_physical = false; |
15 |
16 |
show_physicality = false; |
show_physicality = false; |
|
17 |
|
physicality_marker = 'ok'; |
|
18 |
|
show_physicality_legend = true; |
16 |
19 |
for k=1:2:length(varargin) |
for k=1:2:length(varargin) |
17 |
20 |
switch lower(varargin{k}) |
switch lower(varargin{k}) |
18 |
21 |
case {'line_style', 'linestyle'} |
case {'line_style', 'linestyle'} |
|
... |
... |
function fig = plot_logneg_versus_gamma(meta, tracepairs_ind, varargin) |
21 |
24 |
only_physical = varargin{k+1}; |
only_physical = varargin{k+1}; |
22 |
25 |
case {'show_physicality'} |
case {'show_physicality'} |
23 |
26 |
show_physicality = varargin{k+1}; |
show_physicality = varargin{k+1}; |
|
27 |
|
case {'physicality_marker'} |
|
28 |
|
physicality_marker = varargin{k+1}; |
|
29 |
|
case {'show_physicality_legend','physicality_legend'} |
|
30 |
|
show_physicality_legend = varargin{k+1}; |
24 |
31 |
case {'x_scale','xscale'} |
case {'x_scale','xscale'} |
25 |
32 |
x_scale = varargin{k+1}; |
x_scale = varargin{k+1}; |
26 |
33 |
case {'x_lims','xlims','x_lim','xlim'} |
case {'x_lims','xlims','x_lim','xlim'} |
|
... |
... |
function fig = plot_logneg_versus_gamma(meta, tracepairs_ind, varargin) |
45 |
52 |
legend_location = varargin{k+1}; |
legend_location = varargin{k+1}; |
46 |
53 |
case {'legend_title_maxlength', 'legendtitlemaxlength'} |
case {'legend_title_maxlength', 'legendtitlemaxlength'} |
47 |
54 |
legend_title_maxlength = varargin{k+1}; |
legend_title_maxlength = varargin{k+1}; |
|
55 |
|
case {'legend_title', 'legendtitle'} |
|
56 |
|
legend_title = varargin{k+1}; |
48 |
57 |
case {'legend_postfix','legendpostfix'} |
case {'legend_postfix','legendpostfix'} |
49 |
58 |
legend_postfix = varargin{k+1}; |
legend_postfix = varargin{k+1}; |
50 |
59 |
case {'legend_numberformat','legendnumberformat'} |
case {'legend_numberformat','legendnumberformat'} |
|
... |
... |
function fig = plot_logneg_versus_gamma(meta, tracepairs_ind, varargin) |
81 |
90 |
'color', cmap(color_ind,:),... |
'color', cmap(color_ind,:),... |
82 |
91 |
'title', '', 'legend', false,... |
'title', '', 'legend', false,... |
83 |
92 |
'show_physicality', show_physicality,... |
'show_physicality', show_physicality,... |
|
93 |
|
'physicality_marker', physicality_marker,... |
|
94 |
|
'show_physicality_legend', show_physicality_legend,... |
84 |
95 |
'only_physical', only_physical,... |
'only_physical', only_physical,... |
85 |
96 |
'show_zero', false); |
'show_zero', false); |
86 |
97 |
for k=1:meta.evaluations_no |
for k=1:meta.evaluations_no |
|
... |
... |
function fig = plot_logneg_versus_gamma(meta, tracepairs_ind, varargin) |
112 |
123 |
end |
end |
113 |
124 |
set(leg, 'Color', 'w', 'FontWeight', 'normal',... |
set(leg, 'Color', 'w', 'FontWeight', 'normal',... |
114 |
125 |
'LineWidth', 1, 'Interpreter', 'latex','FontSize',11); |
'LineWidth', 1, 'Interpreter', 'latex','FontSize',11); |
|
126 |
|
leg = compactify_legend(leg); |
|
127 |
|
if ~isempty(legend_title) |
|
128 |
|
legtitle = get(leg,'title'); |
|
129 |
|
set(legtitle,'string', legend_title,... |
|
130 |
|
'interpreter', 'latex','FontSize',11); |
|
131 |
|
end |
115 |
132 |
end |
end |
116 |
133 |
|
|
117 |
134 |
if show_zero |
if show_zero |
|
... |
... |
function fig = plot_logneg_versus_gamma(meta, tracepairs_ind, varargin) |
122 |
139 |
meta.xylims(x_lims, y_lims); |
meta.xylims(x_lims, y_lims); |
123 |
140 |
meta.my_postprocess_plot(fig); |
meta.my_postprocess_plot(fig); |
124 |
141 |
meta.ln_fig = fig; |
meta.ln_fig = fig; |
|
142 |
|
|
|
143 |
|
|
|
144 |
|
|
|
145 |
|
function leg = compactify_legend(leg) |
|
146 |
|
[~,~,plot_handles,leg_strs] = legend(leg); |
|
147 |
|
unwanted_inds = strmatch('', leg_strs, 'exact'); |
|
148 |
|
for k=1:length(leg_strs) |
|
149 |
|
if isequal(leg_strs{k}, ['data',num2str(k)]) |
|
150 |
|
unwanted_inds = [unwanted_inds, k]; |
|
151 |
|
end |
|
152 |
|
end |
|
153 |
|
wanted_inds = setdiff(1:length(leg_strs),unwanted_inds); |
|
154 |
|
leg = legend(plot_handles(wanted_inds), leg_strs{wanted_inds},... |
|
155 |
|
'Location', 'Best'); |