Advertisement
Radeen10-_

plotting

Nov 7th, 2022 (edited)
739
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1.  
  2.  
  3. import numpy as np
  4. import matplotlib.pyplot as plt
  5. from mpl_toolkits.mplot3d import Axes3D
  6. fig = plt.figure()
  7. ax = fig.add_subplot(111, projection='3d')
  8. x, y= np.linspace(-8,8,100), np.linspace(-8,8,100)
  9. X, Y = np.meshgrid(x,y)
  10. print(X,Y)
  11. Z1 = 36.42+88.89*X+8.94*Y
  12. Z2 = 17.16+21.33*X+5.804*Y
  13. ax.plot_surface(X,Y,Z1, alpha=0.5, rstride=100, cstride=100)
  14. ax.plot_surface(X,Y,Z2, alpha=0.5, rstride=100, cstride=100)
  15. ax.plot((1,1),(-8,8),(-9,23), lw=2, c='b')
  16. ax.plot((1,),(-2,),(3,), lw=2, c='k', marker='o')
  17.  
  18. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement