Added colorbar to cost plot

main
Daniel Ingram 2018-09-05 21:17:22 -04:00
parent 4c582e5827
commit 3651a2608b
1 changed files with 8 additions and 4 deletions

View File

@ -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": [