Skip to content

Instantly share code, notes, and snippets.

@ShuaiGuo16
Last active December 27, 2020 22:51
Show Gist options
  • Save ShuaiGuo16/2110f00cfb38416dd40f4c61f5c42d9f to your computer and use it in GitHub Desktop.
Save ShuaiGuo16/2110f00cfb38416dd40f4c61f5c42d9f to your computer and use it in GitHub Desktop.
Plot a single trajectory
# Load trajectory data
traj_X = np.genfromtxt('./Dataset/traj_X.csv', delimiter=',')
traj_Y = np.genfromtxt('./Dataset/traj_Y.csv', delimiter=',')
# Display a single trajectory
fig, ax = plt.subplots(figsize=(8,3))
pick_traj = 5
ax.plot(traj_X[pick_traj,:],traj_Y[pick_traj,:],
color='b', lw=2, linestyle='--')
ax.set(xlim=(-100, 3100), ylim=(-10, 810))
ax.set_xlabel('Range/m', fontsize=15)
ax.set_ylabel('Height/m', fontsize=15);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment