Skip to content

Commit 811a591

Browse files
committed
Revert "[08] make plot compatible with new matplotlib version"
This reverts commit f5c7ca5.
1 parent f5c7ca5 commit 811a591

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

notebooks/08-common-problems.ipynb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,8 @@
7979
" if ax is None:\n",
8080
" fig, ax = plt.subplots()\n",
8181
" for n, _traj in enumerate(data):\n",
82-
" h, e = np.histogram(_traj, bins=30, density=True)\n",
83-
" ax.fill_between(e[1:], h, step='pre', alpha=.33, color='C{}'.format(n))\n",
84-
" \n",
85-
" ylims = (0, ax.get_ylim()[1])\n",
82+
" ax.hist(_traj, bins=30, alpha=.33, density=True, color='C{}'.format(n));\n",
83+
" ylims = ax.get_ylim()\n",
8684
" xlims = ax.get_xlim()\n",
8785
" for n, _traj in enumerate(data):\n",
8886
" ax.plot(\n",
@@ -100,7 +98,6 @@
10098
" ax.text(0.86 * xlims[1], 0.5 * ylims[1], '$x(time)$', ha='left', va='center', rotation=90)\n",
10199
" ax.set_xlabel('TICA coordinate')\n",
102100
" ax.set_ylabel('histogram counts & trajectory time')\n",
103-
" ax.set_ylim(0, ax.get_ylim()[1]) # fill_between resets lower ylim < 0\n",
104101
" ax.legend(loc=2)"
105102
]
106103
},
@@ -908,7 +905,7 @@
908905
"name": "python",
909906
"nbconvert_exporter": "python",
910907
"pygments_lexer": "ipython3",
911-
"version": "3.6.6"
908+
"version": "3.6.5"
912909
},
913910
"toc": {
914911
"base_numbering": 1,

0 commit comments

Comments
 (0)