Skip to content

Instantly share code, notes, and snippets.

View MrBourriz's full-sized avatar
🎯
Focusing

MrBourriz

🎯
Focusing
View GitHub Profile
@neale
neale / plot_trajectory.py
Last active June 12, 2023 16:52
plot 3D trajectory from csv with xyz coordinates
import numpy as np
import matplotlib.pyplot as plt
import mpl_toolkits.mplot3d.axes3d as p3
import matplotlib.animation as animation
import pandas as pd
from sys import exit
def update_lines(num, data, line):
# NOTE: there is no .set_data() for 3 dim data...
line.set_data(data[0:2, :num])
line.set_3d_properties(data[2, :num])