Skip to content

Commit

Permalink
Adjust plot and font sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
yukw777 committed Jun 13, 2024
1 parent 892f03f commit 9d383c4
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions figures/ablation_figures.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 9d383c4

Please sign in to comment.