mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
@@ -124,6 +124,9 @@ def main():
|
||||
|
||||
if show_animation: # pragma: no cover
|
||||
plt.cla()
|
||||
# for stopping simulation with the esc key.
|
||||
plt.gcf().canvas.mpl_connect('key_release_event',
|
||||
lambda event: [exit(0) if event.key == 'escape' else None])
|
||||
plt.axis("equal")
|
||||
plt.plot(0.0, 0.0, "*r")
|
||||
plot_circle(cx, cy, cr)
|
||||
|
||||
@@ -73,6 +73,9 @@ def main():
|
||||
|
||||
if show_animation: # pragma: no cover
|
||||
plt.cla()
|
||||
# for stopping simulation with the esc key.
|
||||
plt.gcf().canvas.mpl_connect('key_release_event',
|
||||
lambda event: [exit(0) if event.key == 'escape' else None])
|
||||
draw_heatmap(gmap, minx, maxx, miny, maxy, xyreso)
|
||||
plt.plot(ox, oy, "xr")
|
||||
plt.plot(0.0, 0.0, "ob")
|
||||
|
||||
@@ -133,8 +133,10 @@ def main():
|
||||
# for animation
|
||||
if show_animation: # pragma: no cover
|
||||
plt.cla()
|
||||
# for stopping simulation with the esc key.
|
||||
plt.gcf().canvas.mpl_connect('key_release_event',
|
||||
lambda event: [exit(0) if event.key == 'escape' else None])
|
||||
clusters.plot_cluster()
|
||||
|
||||
plt.plot(cx, cy, "or")
|
||||
plt.xlim(-2.0, 10.0)
|
||||
plt.ylim(-2.0, 10.0)
|
||||
|
||||
@@ -124,6 +124,9 @@ def main():
|
||||
|
||||
if show_animation: # pragma: no cover
|
||||
plt.cla()
|
||||
# for stopping simulation with the esc key.
|
||||
plt.gcf().canvas.mpl_connect('key_release_event',
|
||||
lambda event: [exit(0) if event.key == 'escape' else None])
|
||||
draw_heatmap(pmap, minx, maxx, miny, maxy, xyreso)
|
||||
plt.plot(ox, oy, "xr")
|
||||
plt.plot(0.0, 0.0, "ob")
|
||||
|
||||
@@ -242,6 +242,9 @@ def main():
|
||||
|
||||
if show_animation: # pragma: no cover
|
||||
plt.cla()
|
||||
# for stopping simulation with the esc key.
|
||||
plt.gcf().canvas.mpl_connect('key_release_event',
|
||||
lambda event: [exit(0) if event.key == 'escape' else None])
|
||||
plt.axis("equal")
|
||||
plt.plot(0.0, 0.0, "*r")
|
||||
v1.plot()
|
||||
|
||||
Reference in New Issue
Block a user