1 from matplotlib import pyplot as plt
6 with open("LOG", "r") as f:
8 (x, y1, y2) = l.split(" ")
9 edist.append(float(y1))
10 rdist.append(float(y2))
13 ax = fig.add_subplot(111)
14 ax.set_aspect("equal")
16 ax.set_title("Comparison of Euclidean and Reeds & Shepp distance")
17 ax.set_xlabel("Euclidean distance [m]")
18 ax.set_ylabel("Difference to Reeds & Shepp distance [m]")
20 plt.plot(edist, [x - y for (x, y) in zip(rdist, edist)], "o")
24 sumy = [[] for i in range(MAX)]
25 for (x, y) in zip(edist, rdist):
26 sumy[int(MAX * x / (2*100**2)**0.5)].append(y - x)
30 for (x, y) in zip(range(MAX), sumy):
32 ax.append(x * (2*100**2)**0.5 / MAX)
33 ay.append(sum(y)/len(y))
34 #plt.plot(range(MAX), asumy, marker="-", color="orange")
35 plt.plot(ax, ay, linestyle="-", color="orange")