2024-heraklion-scientific-p.../notebooks/walker/Step_2_plotting/Step_2_plotting.ipynb
2024-08-27 15:52:41 +03:00

158 KiB

In [1]:
%matplotlib inline

from walker import Walker

Simulate a trajectory

In [3]:
# Create a Walker instance
walker = Walker(sigma_i=3, sigma_j=4, size=200, map_type='hills')

# Sample a next step 1000 times
i, j = 100, 50
trajectory = []
for _ in range(1000):
    i, j = walker.sample_next_step(i, j)
    trajectory.append((i, j))
In [6]:
walker.plot_trajectory(trajectory)
In [7]:
walker.plot_trajectory_hexbin(trajectory)
In [ ]: