Update plot options

main
Aurélien Geron 2022-02-19 18:18:08 +13:00
parent b63019fd28
commit 4ba9496a87
1 changed files with 15 additions and 15 deletions

View File

@ -104,9 +104,9 @@
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"plt.rc('font', size=14)\n",
"plt.rc('font', size=12)\n",
"plt.rc('axes', labelsize=14, titlesize=14)\n",
"plt.rc('legend', fontsize=14)\n",
"plt.rc('legend', fontsize=12)\n",
"plt.rc('xtick', labelsize=10)\n",
"plt.rc('ytick', labelsize=10)"
]
@ -422,7 +422,7 @@
" plt.annotate(country, xy=(pos_data_x, pos_data_y),\n",
" xytext=pos_text, fontsize=12,\n",
" arrowprops=dict(facecolor='black', width=0.5,\n",
" shrink=0.15, headwidth=5))\n",
" shrink=0.08, headwidth=5))\n",
" plt.plot(pos_data_x, pos_data_y, \"ro\")\n",
"\n",
"plt.axis([min_gdp, max_gdp, min_life_sat, max_life_sat])\n",
@ -606,7 +606,7 @@
" plt.annotate(country, xy=(pos_data_x, pos_data_y),\n",
" xytext=pos_text, fontsize=12,\n",
" arrowprops=dict(facecolor='black', width=0.5,\n",
" shrink=0.1, headwidth=5))\n",
" shrink=0.08, headwidth=5))\n",
" plt.plot(pos_data_x, pos_data_y, \"rs\")\n",
"\n",
"X = np.linspace(0, 115_000, 1000)\n",
@ -698,7 +698,7 @@
"t0ridge, t1ridge = ridge.intercept_[0], ridge.coef_[0][0]\n",
"plt.plot(X, t0ridge + t1ridge * X, \"b--\",\n",
" label=\"Regularized linear model on partial data\")\n",
"plt.legend(loc=\"lower right\", fontsize=13)\n",
"plt.legend(loc=\"lower right\")\n",
"\n",
"plt.axis([0, 115_000, min_life_sat, max_life_sat])\n",
"\n",