From 09730d47474e44ca98d2a13d182342937f5ad120 Mon Sep 17 00:00:00 2001 From: kyleclo Date: Wed, 18 Dec 2024 14:31:52 -0800 Subject: [PATCH] remove box legend; shift down --- scripts/flops_by_perf_figure.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/scripts/flops_by_perf_figure.py b/scripts/flops_by_perf_figure.py index 4bf88f88d..e03a51e33 100644 --- a/scripts/flops_by_perf_figure.py +++ b/scripts/flops_by_perf_figure.py @@ -46,9 +46,6 @@ # print(font) -cache_dir = mpl.get_cachedir() -shutil.rmtree(cache_dir) - # Load the font file font_path = "/Users/kylel/Library/Fonts/Manrope-VariableFont_wght.ttf" font_prop = FontProperties(fname=font_path) @@ -226,7 +223,6 @@ def format_scientific(x): # Customize the plot plt.xlabel("Approximate FLOPs", fontsize=12) plt.ylabel(f"Avg Performance ({num_datasets} Benchmarks)", fontsize=12) -# plt.title("FLOPs vs Performance", fontsize=14, pad=20) # Add grid plt.grid(True, which="both", ls="-", alpha=0.2) @@ -241,7 +237,7 @@ def format_scientific(x): plt.legend( ordered_handles, desired_order, - bbox_to_anchor=(0, 1.02, 1.0, 0.2), + bbox_to_anchor=(0, 0.97, 1.0, 0.2), loc="center", ncol=len(categories), mode="expand", @@ -249,6 +245,7 @@ def format_scientific(x): fontsize=8, handletextpad=0.05, # Reduce space between marker and label columnspacing=0.5, # Adjust space between columns + frameon=False, # Remove the legend border ) # Adjust the layout to prevent legend cutoff