Skip to content

Commit

Permalink
Fix deprecated Matplotlib grid argument in AEPsych tutorial (facebook…
Browse files Browse the repository at this point in the history
…research#397)

Summary:
### PR Description:
This pull request fixes issue facebookresearch#372, which involves the use of the deprecated `ax.grid(b=None)` in the AEPsych tutorial. As per the [Matplotlib 3.9.0 API updates](https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.9.0.html), the `b=None` argument has been removed, causing a `ValueError` in recent versions (3.9.0 and above).

To address this, the `b=None` argument has been removed from two lines in the notebook, ensuring compatibility with Matplotlib 3.9.2 and higher.

The database-related error has already been resolved in PR facebookresearch#295, so no further changes are necessary regarding that.

This PR resolves the compatibility issue and ensures the tutorial runs correctly with the latest version of Matplotlib.

Pull Request resolved: facebookresearch#397

Reviewed By: crasanders

Differential Revision: D64153309

Pulled By: JasonKChow

fbshipit-source-id: 77051074797821901f9fa8e4b52ef2effed9a350
  • Loading branch information
yalsaffar authored and facebook-github-bot committed Oct 14, 2024
1 parent 6383dc9 commit b278dd1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions examples/data_collection_analysis_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
" verticalalignment='center',\n",
" transform=ax.transAxes)\n",
" ax.axis('off')\n",
" ax.grid(b=None)\n",
" ax.grid()\n",
" plt.show()\n",
"\n",
"# Evaluate the gabor filter function at an x,y position\n",
Expand All @@ -73,7 +73,7 @@
" M = ((M - M.min())) / (M.max() - M.min())\n",
"\n",
" ax.axis('off')\n",
" ax.grid(b=None)\n",
" ax.grid()\n",
" ax.imshow(M.T, cmap=cm.Greys_r)\n",
"\n",
"\n",
Expand Down Expand Up @@ -772,13 +772,13 @@
}
],
"metadata": {
"interpreter": {
"hash": "445720f8fdcbba65d997174e9b6315f32a9c0fb7d8d99a631746a7b63e54ff16"
},
"kernelspec": {
"display_name": "Python 3.9.7 64-bit",
"name": "python3"
},
"interpreter": {
"hash": "445720f8fdcbba65d997174e9b6315f32a9c0fb7d8d99a631746a7b63e54ff16"
},
"kernelspec": {
"display_name": "Python 3.9.7 64-bit",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
Expand Down

0 comments on commit b278dd1

Please sign in to comment.