Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- from random_walk import RandomWalk
- while True:
- rw = RandomWalk(5000)
- rw.fill_walk()
- points_number = rw.x_points[:]
- plt.scatter(rw.x_points, rw.y_points, s=15, c=points_number,
- cmap = plt.cm.Greens, edgecolor='none')
- plt.scatter(rw.x_points[0], rw.y_points[0], s=45, c='Red')
- plt.scatter(rw.x_points[-1], rw.y_points[-1], s=45, c='Red')
- plt.axes().get_yaxis().set_visible(False)
- plt.axes().get_xaxis().set_visible(False)
- plt.show()
- answer = input('An another random walk? (Y/N) ')
- if answer.upper().strip() == 'N':
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement