Python, Matplotlib, Animation, Statistics, Code.
in range(len(path)): sample = path[pos] yield np.array([ sample[0], sample[1] ]) #below code of if statements are to re-size the simulation if the random walk goes out of the frame def resize_plot(xmin, xmax,ymin, ymax, t, y): if t >= xmax: ax.set_xlim(1.1*xmin, 1.1*xmax) ax.figure.canvas.draw() if