Guest User

Untitled

a guest
Apr 20th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import numpy.random as rand
  3.  
  4. print("Wait...")
  5. ###MAKING DATA###
  6. x = []
  7. y = []
  8. tmp = 10000 ###PLAY
  9. mintmp = 0 - tmp
  10.  
  11. for i in range(mintmp, tmp):
  12. r_x = rand.randint(mintmp, tmp)
  13. r_y = rand.randint(mintmp, tmp)
  14. x.append(r_x)
  15. y.append(r_y)
  16.  
  17. ###CALC DATA###
  18. cycle = tmp * 2
  19. st_x = []
  20. st_y = []
  21. for i in range(0, cycle):
  22. calc_x = (x[i] - y[i]) - x[i] / 2
  23. calc_y = (y[i] - x[i]) - y[i] / 2
  24. st_x.append(calc_x)
  25. st_y.append(calc_y)
  26.  
  27. ###DRAW###
  28. scale = 10 ###PLAY
  29. color = 'red' ###PLAY
  30. alph = 0.2 ###PLAY
  31. plt.scatter(st_x, st_y, c=color, s=scale, alpha=alph, edgecolors='none')
  32. plt.show()
Add Comment
Please, Sign In to add comment