Created
June 10, 2016 21:09
-
-
Save kevinmehall/0880a544fcc40ac38d67bff58ead9341 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import matplotlib.pyplot as plt | |
from mpl_toolkits.mplot3d import Axes3D | |
fig = plt.figure() | |
ax = fig.add_subplot(111, projection='3d') | |
f = open(sys.argv[1]) | |
f.next() | |
f.next() | |
ts = [] | |
xs = [] | |
ys = [] | |
zs = [] | |
for line in f: | |
line = line.split() | |
if line[5] != '5': # mode not single | |
t, x, y, z = map(float, line[1:5]) | |
ts.append(t) | |
xs.append(x) | |
ys.append(y) | |
zs.append(z) | |
ax.plot(xs, ys, zs) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment