Advertisement
UF6

Group Project 2, Problem 12

UF6
Apr 13th, 2016
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. %matplotlib notebook
  2. from mpl_toolkits.mplot3d import axes3d
  3. import matplotlib.pyplot as plt
  4. import numpy as np
  5.  
  6. fig= plt.figure()
  7. ax = fig.add_subplot(111, projection='3d')
  8.  
  9. t = np.linspace(-2,2,11)
  10. x=2+t
  11. y=1-t
  12. z=t
  13.  
  14. ax.plot(x,y,z)
  15.  
  16. ax.set_xlabel('x')
  17. ax.set_ylabel('y')
  18. ax.set_zlabel('z')
  19.  
  20. ax.view_init(31,-15)
  21.  
  22. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement