From: Alan G I. <ala...@gm...> - 2010-02-05 13:24:26
|
On 2/5/2010 12:51 AM, Wayne Watson wrote: > what I'm looking for is a way to draw a zig-zag path > indicating a path taken by a particle Here is a 2d example: >>> import numpy as np >>> import matplotlib.pyplot as plt >>> locs = np.random.random_sample((2,30)) >>> locs = np.random.random_sample((2,30)) - 0.5 >>> locs = np.cumsum(locs, axis=-1) >>> x,y = locs >>> plt.plot(x,y) hth, Alan Isaac |