From ae4f7bf4fafbe5d7bc42632ae319cb428a9b73f7 Mon Sep 17 00:00:00 2001 From: rschoene <rene.schoene@tu-dresden.de> Date: Wed, 2 Mar 2016 13:36:30 +0100 Subject: [PATCH] Increase font size in diagrams. --- ilp-measurement.ipynb | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/ilp-measurement.ipynb b/ilp-measurement.ipynb index 9c33d2f..605a48a 100644 --- a/ilp-measurement.ipynb +++ b/ilp-measurement.ipynb @@ -664,7 +664,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 21, "metadata": { "collapsed": false }, @@ -733,7 +733,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 36, "metadata": { "collapsed": false, "scrolled": true @@ -810,8 +810,10 @@ " axes = plt.gca()\n", " axes.set_ylim([0,50])\n", " # plt.title('{0} {1} {2}'.format(name.title(), change_to_title(change), strategy_to_titel(strategy)))\n", - " plt.ylabel('seconds')\n", - " plt.xlabel('step')\n", + " plt.ylabel('seconds', fontsize = 14)\n", + " plt.xlabel('step', fontsize = 14)\n", + " plt.setp(axes.xaxis.get_majorticklabels(), fontsize = 16)\n", + " plt.setp(axes.yaxis.get_majorticklabels(), fontsize = 16)\n", " if change == 'mixed':\n", " for i, label in enumerate(axes.get_xticklabels()):\n", " label.set_visible(i==0 or (i+1) % 10 == 0)\n", @@ -879,7 +881,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 37, "metadata": { "collapsed": false }, @@ -922,12 +924,12 @@ " bp = plt.boxplot(y.transpose(), patch_artist=True, positions = np.arange(y.shape[0])*4+i)\n", " setBoxColors(bp, colors)\n", " # line, = plt.plot([1,1],c[0]+'-')\n", - " invisibles.append(mpatches.Patch(color=colors[box_facecolor], label=strategy_to_titel(strategy)))\n", + " invisibles.append(mpatches.Patch(color=colors[box_facecolor], label=strategy_to_titel(strategy), linewidth = 1))\n", " axes = plt.gca()\n", " y_len = y.shape[0]\n", " axes.set_ylim([0,50])\n", - " plt.ylabel('seconds')\n", - " plt.xlabel('step')\n", + " plt.ylabel('seconds', fontsize = 14)\n", + " plt.xlabel('step', fontsize = 14)\n", " if change == 'mixed':\n", " axes.set_xlim([-1,y_len*4+1])\n", " axes.set_xticklabels(range(0,111,10))\n", @@ -936,8 +938,11 @@ " axes.set_xlim([-1,y_len*4-1])\n", " axes.set_xticklabels(range(1,y_len+1))\n", " axes.set_xticks(range(1,y_len*4,4))\n", + " plt.setp(axes.xaxis.get_majorticklabels(), fontsize = 16)\n", + " plt.setp(axes.yaxis.get_majorticklabels(), fontsize = 16)\n", "\n", - " plt.legend(handles=invisibles, loc='best' if change == 'mixed' else 'upper center', ncol = 3, mode = \"expand\")\n", + " plt.legend(handles=invisibles, loc='best' if change == 'mixed' else 'upper center',\n", + " ncol = 3, mode = \"expand\", prop={'size':13}, handletextpad = 0.3)\n", "\n", " fname = 'gen_bp_{0}{1}_{2}'.format(name,'_avg' if draw_average else '',change)\n", " plt.savefig(pdfpath(fname))\n", @@ -1240,6 +1245,8 @@ " ax.set_ylim([0,1.05])\n", " if rotation_xaxis:\n", " plt.setp(ax.xaxis.get_majorticklabels(), rotation=rotation_xaxis)\n", + " plt.setp(ax.xaxis.get_majorticklabels(), fontsize = 15)\n", + " plt.setp(ax.yaxis.get_majorticklabels(), fontsize = 15)\n", "# plt.axes().xaxis.set_major_locator(matplotlib.ticker.FixedLocator(range(0, 3, 2)))\n", "# plt.axes().xaxis.set_minor_locator(matplotlib.ticker.FixedLocator([1]))\n", "# plt.axes().xaxis.set_minor_formatter(matplotlib.ticker.FormatStrFormatter(\"%s\"))\n", -- GitLab