Skip to content

Commit

Permalink
Fix CementiteAnalysis.ipynb - by adding np.squeeze()
Browse files Browse the repository at this point in the history
It has to be "fig.gca().plot(result['T'], np.squeeze(4.0 * result['heat_capacity']))" rather than "fig.gca().plot(result['T'], 4.0 * result['heat_capacity'])"
  • Loading branch information
jan-janssen authored and bocklund committed Jun 8, 2017
1 parent 0f8f0e3 commit b9bddc4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/CementiteAnalysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from pycalphad import Database, calculate\n",
"\n",
"db = Database(TDB)"
Expand Down Expand Up @@ -122,7 +123,7 @@
"fig = plt.figure(figsize=(9,6))\n",
"fig.gca().set_xlabel('Temperature (K)')\n",
"fig.gca().set_ylabel('Isobaric Heat Capacity (J/mol-formula-K)')\n",
"fig.gca().plot(result['T'], 4.0 * result['heat_capacity'])\n",
"fig.gca().plot(result['T'], np.squeeze(4.0 * result['heat_capacity']))\n",
"plt.show()"
]
},
Expand Down

0 comments on commit b9bddc4

Please sign in to comment.