From 0c5cc2259d84edbc75912960cd078e54bb83f365 Mon Sep 17 00:00:00 2001 From: scuti Date: Sat, 19 Apr 2025 14:58:09 -0700 Subject: [PATCH] Made all graphs to have tight bounding boxes. --- stackoverflow-survey.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stackoverflow-survey.ipynb b/stackoverflow-survey.ipynb index 70af2cc..aa9ae02 100644 --- a/stackoverflow-survey.ipynb +++ b/stackoverflow-survey.ipynb @@ -89,7 +89,7 @@ " plt.grid(axis='x', linestyle='--', alpha=0.75) \n", " plt.title(\"%s vs %s\" % (label1, label2))\n", " if saveto is not None:\n", - " plt.savefig(saveto)\n", + " plt.savefig(saveto, bbox_inches='tight')\n", " del df, df2\n", "\n", "l1 = get_langs( so_df )\n", @@ -152,7 +152,7 @@ " # don't draw the line if every value is greater than 0\n", " plt.axhline(y=df[KEY].tolist().index(lowest) + offset, color='red', linestyle='--')\n", " if saveto is not None:\n", - " plt.savefig(saveto)\n", + " plt.savefig(saveto, bbox_inches='tight')\n", " \n", "motiv_diff = get_difference(l2, l1)\n", "# print(motiv_diff)\n",