Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
edit plots
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrusch committed Dec 3, 2023
1 parent b8aad2e commit b7c7340
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) ;)
Expand Down
8 changes: 5 additions & 3 deletions plot/bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Binary file not shown.
Binary file modified ref_result/__bar_acc_ref_result_original_ref_result_attacks.pdf
Binary file not shown.
Binary file modified ref_result/__bar_acc_ref_result_perf_ubuntu.pdf
Binary file not shown.
Binary file not shown.

0 comments on commit b7c7340

Please sign in to comment.