Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %matplotlib notebook
- from mpl_toolkits.mplot3d import axes3d
- import matplotlib.pyplot as plt
- import numpy as np
- fig= plt.figure()
- ax = fig.add_subplot(111, projection='3d')
- t = np.linspace(-2,2,11)
- x=2+t
- y=1-t
- z=t
- ax.plot(x,y,z)
- ax.set_xlabel('x')
- ax.set_ylabel('y')
- ax.set_zlabel('z')
- ax.view_init(31,-15)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement