Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2022
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. from random_walk import RandomWalk
  3.  
  4. while True:
  5.     rw = RandomWalk(5000)
  6.     rw.fill_walk()
  7.     points_number = rw.x_points[:]
  8.     plt.scatter(rw.x_points, rw.y_points, s=15, c=points_number,
  9.     cmap = plt.cm.Greens, edgecolor='none')
  10.     plt.scatter(rw.x_points[0], rw.y_points[0], s=45, c='Red')
  11.     plt.scatter(rw.x_points[-1], rw.y_points[-1], s=45, c='Red')
  12.     plt.axes().get_yaxis().set_visible(False)
  13.     plt.axes().get_xaxis().set_visible(False)
  14.     plt.show()
  15.     answer = input('An another random walk? (Y/N) ')
  16.     if answer.upper().strip() == 'N':
  17.         break
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement