Update plot options
parent
b63019fd28
commit
4ba9496a87
|
@ -104,9 +104,9 @@
|
||||||
"source": [
|
"source": [
|
||||||
"import matplotlib.pyplot as plt\n",
|
"import matplotlib.pyplot as plt\n",
|
||||||
"\n",
|
"\n",
|
||||||
"plt.rc('font', size=14)\n",
|
"plt.rc('font', size=12)\n",
|
||||||
"plt.rc('axes', labelsize=14, titlesize=14)\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('xtick', labelsize=10)\n",
|
||||||
"plt.rc('ytick', labelsize=10)"
|
"plt.rc('ytick', labelsize=10)"
|
||||||
]
|
]
|
||||||
|
@ -422,7 +422,7 @@
|
||||||
" plt.annotate(country, xy=(pos_data_x, pos_data_y),\n",
|
" plt.annotate(country, xy=(pos_data_x, pos_data_y),\n",
|
||||||
" xytext=pos_text, fontsize=12,\n",
|
" xytext=pos_text, fontsize=12,\n",
|
||||||
" arrowprops=dict(facecolor='black', width=0.5,\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",
|
" plt.plot(pos_data_x, pos_data_y, \"ro\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"plt.axis([min_gdp, max_gdp, min_life_sat, max_life_sat])\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",
|
" plt.annotate(country, xy=(pos_data_x, pos_data_y),\n",
|
||||||
" xytext=pos_text, fontsize=12,\n",
|
" xytext=pos_text, fontsize=12,\n",
|
||||||
" arrowprops=dict(facecolor='black', width=0.5,\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",
|
" plt.plot(pos_data_x, pos_data_y, \"rs\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"X = np.linspace(0, 115_000, 1000)\n",
|
"X = np.linspace(0, 115_000, 1000)\n",
|
||||||
|
@ -698,7 +698,7 @@
|
||||||
"t0ridge, t1ridge = ridge.intercept_[0], ridge.coef_[0][0]\n",
|
"t0ridge, t1ridge = ridge.intercept_[0], ridge.coef_[0][0]\n",
|
||||||
"plt.plot(X, t0ridge + t1ridge * X, \"b--\",\n",
|
"plt.plot(X, t0ridge + t1ridge * X, \"b--\",\n",
|
||||||
" label=\"Regularized linear model on partial data\")\n",
|
" label=\"Regularized linear model on partial data\")\n",
|
||||||
"plt.legend(loc=\"lower right\", fontsize=13)\n",
|
"plt.legend(loc=\"lower right\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"plt.axis([0, 115_000, min_life_sat, max_life_sat])\n",
|
"plt.axis([0, 115_000, min_life_sat, max_life_sat])\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|
Loading…
Reference in New Issue