From 9d383c4b65178c2e75436782034150d528eeccef Mon Sep 17 00:00:00 2001 From: Peter Yu <2057325+yukw777@users.noreply.github.com> Date: Wed, 12 Jun 2024 22:42:22 -0400 Subject: [PATCH] Adjust plot and font sizes --- figures/ablation_figures.ipynb | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/figures/ablation_figures.ipynb b/figures/ablation_figures.ipynb index 12209c5..eaa538a 100644 --- a/figures/ablation_figures.ipynb +++ b/figures/ablation_figures.ipynb @@ -24,7 +24,7 @@ " sns.set_theme(style=\"darkgrid\")\n", " plt.rcParams[\"font.family\"] = \"Caladea\"\n", " fig, axes = plt.subplots(\n", - " len(metrics), 1, figsize=(24, 8 * len(metrics)), sharex=True\n", + " len(metrics), 1, figsize=(24, 12 * len(metrics)), sharex=True\n", " )\n", "\n", " # Iterate through each metric to create a subplot\n", @@ -52,12 +52,15 @@ " linewidth=12,\n", " marker=\"D\",\n", " markersize=20,\n", + " alpha=0.7,\n", " **kwargs,\n", " )\n", " if i == len(metrics) - 1:\n", - " ax.set_xlabel(\"Shot\", fontsize=54, fontweight=\"bold\")\n", - " ax.set_ylabel(metric, fontsize=54, fontweight=\"bold\")\n", - " ax.set_xticks(ticks=range(len(shots)), labels=[str(shot) for shot in shots])\n", + " ax.set_xlabel(\"Shot\", fontsize=70, fontweight=\"bold\")\n", + " ax.set_ylabel(metric, fontsize=70, fontweight=\"bold\")\n", + " ax.set_xticks(\n", + " ticks=range(len(shots)), labels=[str(shot) for shot in shots], fontsize=48\n", + " )\n", " ax.grid(True)\n", " ax.get_legend().remove()\n", "\n", @@ -67,7 +70,7 @@ " labels,\n", " loc=\"lower center\",\n", " bbox_to_anchor=(0.5, 1),\n", - " fontsize=48,\n", + " fontsize=58,\n", " ncol=legend_ncol,\n", " columnspacing=0.8,\n", " )\n", @@ -301,6 +304,12 @@ " },\n", "}\n", "\n", + "models = [\n", + " \"EILEV BLIP-2 OPT-2.7B\",\n", + " \"EILEV BLIP-2 Flan-T5-xl\",\n", + " \"Ablation BLIP-2 OPT-2.7B\",\n", + " \"Ablation BLIP-2 Flan-T5-xl\",\n", + "]\n", "draw_graphs(\n", " {**eilev_data, **dynamic_ablation_data},\n", " models,\n",