mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-24 08:50:26 +01:00
Added colorbar to cost plot
This commit is contained in:
@@ -159,18 +159,22 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(10, 5))\n",
|
||||
"data_ax = fig.add_subplot(121)\n",
|
||||
"cost_ax = fig.add_subplot(122)"
|
||||
"cost_ax = fig.add_subplot(122)\n",
|
||||
"\n",
|
||||
"cost_ax.plot(exact_solution[0,0], exact_solution[1,0], 'y*')\n",
|
||||
"cost_img = cost_ax.pcolor(theta0, theta1, cost_map)\n",
|
||||
"fig.colorbar(cost_img)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"execution_count": 16,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -208,7 +212,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"execution_count": 17,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
||||
Reference in New Issue
Block a user