diff --git a/week01_intro/seminar_gym_interface.ipynb b/week01_intro/seminar_gym_interface.ipynb index f3efe6b9c..befaa5ed3 100644 --- a/week01_intro/seminar_gym_interface.ipynb +++ b/week01_intro/seminar_gym_interface.ipynb @@ -990,11 +990,7 @@ "\n", "%matplotlib inline", "\n", - "fig = plt.figure()", - "\n", - "ax = fig.add_subplot(111)", - "\n", - "fig.show()", + "from IPython.display import clear_output", "\n", "\n", "\n", @@ -1008,11 +1004,11 @@ "\n", " # draw game image on display", "\n", - " ax.clear()", + " clear_output(True)", "\n", " ax.imshow(env.render('rgb_array'))", "\n", - " fig.canvas.draw()", + " plt.show()", "\n", "\n", " if done:", @@ -1023,7 +1019,7 @@ "\n", "else:", "\n", - " print(\"Time limit exceeded. Try again.\")" + " print(\"Time limit exceeded. Try again.\");" ] }, {