Added colorbar to cost plot
parent
4c582e5827
commit
3651a2608b
|
@ -159,18 +159,22 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 11,
|
"execution_count": 15,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"fig = plt.figure(figsize=(10, 5))\n",
|
"fig = plt.figure(figsize=(10, 5))\n",
|
||||||
"data_ax = fig.add_subplot(121)\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",
|
"cell_type": "code",
|
||||||
"execution_count": 12,
|
"execution_count": 16,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
@ -208,7 +212,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 13,
|
"execution_count": 17,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
|
Loading…
Reference in New Issue