Skip to content

Instantly share code, notes, and snippets.

@messa
Last active January 21, 2017 20:02
Show Gist options
  • Save messa/da33c22ef29e0e926882 to your computer and use it in GitHub Desktop.
Save messa/da33c22ef29e0e926882 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python3
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from math import sin, cos
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
xs, ys, zs = [], [], []
for i in range(1000):
xs.append(sin(0.1 * i) * i)
ys.append(cos(0.1 * i) * i)
zs.append(i)
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