mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
@@ -567,6 +567,9 @@ def plot_animation(X, U): # pragma: no cover
|
||||
|
||||
fig = plt.figure()
|
||||
ax = fig.gca(projection='3d')
|
||||
# for stopping simulation with the esc key.
|
||||
fig.canvas.mpl_connect('key_release_event',
|
||||
lambda event: [exit(0) if event.key == 'escape' else None])
|
||||
|
||||
for k in range(K):
|
||||
plt.cla()
|
||||
|
||||
Reference in New Issue
Block a user