From: Eric Firing <efiring@ha...>  20091129 17:10:26

Alan G Isaac wrote: > I have a collection of 2d points xy. > Instead of simply plotting the points, > I'd like to plot a collection of arrows > that goes from each point to the next. > The "from" is easy of course; > the "to" is the problem. > > I think I should be able to use quiver, > but I'm not getting it quite right. > E.g., > > x,y = zip(*xy) > u,v = np.diff(x), np.diff(y) > quiver(x[:1], y[:1], u, v, angles='xy') > > looks like a start but does not get there. > I guessed that `scale=1` would complete > the picture, but that just showed that I > misunderstood `scale`. > > Suggestions? Try this: quiver(x[:1], y[:1], u, v, angles='xy', units='x', scale=1) Eric 