Skip to content
Snippets Groups Projects
Commit 90ab2df6 authored by Steven Lange's avatar Steven Lange
Browse files

Added legend to CACC-Plots

parent 8cb78f89
No related merge requests found
...@@ -150,24 +150,27 @@ if __name__ == "__main__": ...@@ -150,24 +150,27 @@ if __name__ == "__main__":
plt.subplot(131) plt.subplot(131)
plt.plot(t, y_pos[0], 'r') plt.plot(t, y_pos[0], 'r', label='LV')
plt.plot(t, y_pos[1], 'b') plt.plot(t, y_pos[1], 'b', label='FV 1')
plt.plot(t, y_pos[2], 'g') plt.plot(t, y_pos[2], 'g', label='FV 2')
plt.legend()
plt.title("Position") plt.title("Position")
plt.subplot(132) plt.subplot(132)
plt.plot(t, mesPS, 'r--') plt.plot(t, mesPS, 'r--', label='PS')
plt.plot(t, y_speed[0], 'r-') plt.plot(t, y_speed[0], 'r-', label='LV')
plt.plot(t, y_speed[1], 'b') plt.plot(t, y_speed[1], 'b-', label='FV 1')
plt.plot(t, y_speed[2], 'g') plt.plot(t, y_speed[2], 'g-', label='FV 2')
plt.legend()
plt.title("Speed") plt.title("Speed")
plt.subplot(133) plt.subplot(133)
plt.plot(t, mesIPD, 'r--') plt.plot(t, mesIPD, 'r--', label='IPD')
plt.plot(t, y_dist[1], 'b-') plt.plot(t, y_dist[1], 'b-', label='FV1 - LV - Distance')
plt.plot(t, y_cdist[1], 'b--') plt.plot(t, y_cdist[1], 'b--', label='FV1 - cIPD)')
plt.plot(t, y_dist[2], 'g-') plt.plot(t, y_dist[2], 'g-', label='FV2 - FV1 - Distance')
plt.plot(t, y_cdist[2], 'g--') plt.plot(t, y_cdist[2], 'g--', label='FV2 - cIPD')
plt.legend()
plt.title("Distance") plt.title("Distance")
plt.show() plt.show()
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment