diff --git a/Makefile b/Makefile index 36cf151..6d2763b 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,8 @@ perf: plots: if [ -d "$(DIR)/original" ] && [ -d "$(DIR)/attacks" ]; \ then python3 -m plot bar "$(DIR)/original,$(DIR)/attacks" --out $(DIR); fi + if [ -d "$(DIR)/reset" ] && [ -d "$(DIR)/attacks" ]; \ + then python3 -m plot bar "$(DIR)/reset,$(DIR)/attacks" --out $(DIR); fi $(foreach d, $(PER_DIRS), \ python3 -m plot table $(d) -b $(d) --out $(DIR) && \ python3 -m plot bar $(d) --out $(DIR) ;) diff --git a/plot/bar.py b/plot/bar.py index a3f6678..8df6be9 100644 --- a/plot/bar.py +++ b/plot/bar.py @@ -143,12 +143,14 @@ def plot_acc(input_data, plot_name, data_labels, leg = fig.legend( data_labels, ncol=len(data_labels) if pl_n > 1 else 2, - bbox_to_anchor=((0.22, 1.1) if pl_n > 1 and sp_n == 1 - else (0.22, 1.05)), + bbox_to_anchor=( + (0.22, 1.1) if pl_n > 1 and sp_n == 1 + else (0.22, 1.05)), loc='upper left', frameon=False, handlelength=.9, handletextpad=0.4, columnspacing=.8 if pl_n == 1 else 1.5, - borderpad=0) + borderpad=0, + **{'prop': {'size': 11} if pl_n > 1 else None}) for p in leg.get_patches(): p.set_edgecolor([0, 0, 0, .85]) p.set_linewidth(.75) diff --git a/ref_result/__bar_acc_ref_result_attacks_ref_result_reset.pdf b/ref_result/__bar_acc_ref_result_attacks_ref_result_reset.pdf new file mode 100644 index 0000000..73c0a02 Binary files /dev/null and b/ref_result/__bar_acc_ref_result_attacks_ref_result_reset.pdf differ diff --git a/ref_result/__bar_acc_ref_result_original_ref_result_attacks.pdf b/ref_result/__bar_acc_ref_result_original_ref_result_attacks.pdf index 0364420..9efbc65 100644 Binary files a/ref_result/__bar_acc_ref_result_original_ref_result_attacks.pdf and b/ref_result/__bar_acc_ref_result_original_ref_result_attacks.pdf differ diff --git a/ref_result/__bar_acc_ref_result_perf_ubuntu.pdf b/ref_result/__bar_acc_ref_result_perf_ubuntu.pdf index f4b55f3..915e633 100644 Binary files a/ref_result/__bar_acc_ref_result_perf_ubuntu.pdf and b/ref_result/__bar_acc_ref_result_perf_ubuntu.pdf differ diff --git a/ref_result/__bar_acc_ref_result_reset_ref_result_attacks.pdf b/ref_result/__bar_acc_ref_result_reset_ref_result_attacks.pdf new file mode 100644 index 0000000..7205965 Binary files /dev/null and b/ref_result/__bar_acc_ref_result_reset_ref_result_attacks.pdf differ