Skip to content

Commit 29fa960

Browse files
dqian3Atcold
andauthored
[DLFL23] 14-truck_backer_upper.ipynb - Fix oudated matplotlib API usage (#846)
* fix dependencies and outdated mpl api usage * fix naming inconsistency * Revert cosmetic changes --------- Co-authored-by: Alfredo Canziani <[email protected]>
1 parent 01bed6f commit 29fa960

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

14-truck_backer-upper.ipynb 14-truck_backer_upper.ipynb

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"outputs": [],
2121
"source": [
2222
"style.use(['dark_background', 'bmh'])\n",
23-
"%matplotlib notebook"
23+
"%matplotlib widget"
2424
]
2525
},
2626
{
@@ -163,7 +163,7 @@
163163
" ax.add_line(bar)\n",
164164
"\n",
165165
" car = Rectangle(\n",
166-
" (x1, y1 - W / 2), L, W, 0, color='C2', alpha=0.8, transform=\n",
166+
" (x1, y1 - W / 2), L, W, color='C2', alpha=0.8, transform=\n",
167167
" matplotlib.transforms.Affine2D().rotate_deg_around(x1, y1, θ0 * 180 / π) +\n",
168168
" ax.transData\n",
169169
" )\n",
@@ -191,7 +191,7 @@
191191
" \n",
192192
" x, y = x - d * cos(θ1), y - d * sin(θ1) - W / 2\n",
193193
" trailer = Rectangle(\n",
194-
" (x, y), d, W, 0, color='C0', alpha=0.8, transform=\n",
194+
" (x, y), d, W, color='C0', alpha=0.8, transform=\n",
195195
" matplotlib.transforms.Affine2D().rotate_deg_around(x, y + W/2, θ1 * 180 / π) +\n",
196196
" ax.transData\n",
197197
" )\n",
@@ -252,7 +252,7 @@
252252
"episodes = 10\n",
253253
"inputs = list()\n",
254254
"outputs = list()\n",
255-
"# truck = Truck(); episodes = 10_000 # uncooment for creating the data set\n",
255+
"# truck = Truck(); episodes = 10_000 # uncomment for creating the data set\n",
256256
"\n",
257257
"for episode in tqdm(range(episodes)):\n",
258258
" \n",
@@ -400,7 +400,7 @@
400400
],
401401
"metadata": {
402402
"kernelspec": {
403-
"display_name": "Python 3 [conda env:pDL]",
403+
"display_name": "Python 3 (ipykernel)",
404404
"language": "python",
405405
"name": "python3"
406406
},
@@ -414,7 +414,7 @@
414414
"name": "python",
415415
"nbconvert_exporter": "python",
416416
"pygments_lexer": "ipython3",
417-
"version": "3.8.2"
417+
"version": "3.10.12"
418418
}
419419
},
420420
"nbformat": 4,

environment.yml

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ dependencies:
1313
- torchtext
1414
- opencv
1515
- librosa
16+
- ipympl
1617
- pip:
1718
- torchviz

0 commit comments

Comments
 (0)