Socialking

Untitled

Jun 23rd, 2021
685
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import matplotlib.pyplot as plt
  2. import numpy as np
  3.  
  4.  
  5. def range(n, vmin, vmax):
  6.     return (vmax - vmin)*np.random.rand(n) + vmin
  7.  
  8.  
  9. fig = plt.figure()
  10. ax = fig.add_subplot(projection='3d')
  11.  
  12. n = 10
  13.  
  14. for m, zlow, zhigh in [('o', -50, -25)]:
  15.     xs = range(n, 23, 32)
  16.     ys = range(n, 0, 100)
  17.     zs = range(n, zlow, zhigh)
  18.     ax.scatter(xs, ys, zs, marker=m)
  19.  
  20. fig = plt.figure()
  21. fig.add_subplot(111)
  22. plt.scatter(xs, ys)
  23.  
  24. ax.set_xlabel('X')
  25. ax.set_ylabel('Y')
  26. ax.set_zlabel('Z')
  27.  
  28. plt.show()
  29.  
RAW Paste Data