|
From: Gary R. <gr...@bi...> - 2006-05-24 15:39:47
|
Looks good, but I think it also needs a 'width' or 'weight' kwarg. I was also thinking of putting at least a couple of different arrow styles in via an 'arrowstyle' kwarg, so I'd pass those through to the Arrow LineCollection. Gary R. Rob Hetland wrote: > It might make some sense to rethink the quiver API, especially since it > seems there are a few people working toward the same goal (I will help, > too, if someone can give me some tasks..). > > Here's a strawman quiver API: > > quiver(x, y, u, v, color='b', scale=1.0, scale_to_grid=False, **kwargs) > > x, y - quiver should be able to handle *random* (x, y) points (right > now, it seems to expect meshed positions -- it seems this is > an unnecessary constraint.) > > color - could be a plot-style color (e.g., 'b', 'k', 'm'), a tuple, or > an array the same size as x and y to be mapped using the colormap. > > scale - is a multiplier for the vector length. > > scale_to_grid - is a boolean that specifies whether the vectors should > be in grid coordinates (True), or scaled to fit nicely (False -- vectors > are scaled to fit nice, then multiplied by scale). > > Plus all the normal kwargs (e.g., cmap). > > > Other potential things to consider include scaling the aspect of the > vectors so that the grid can have an aspect ratio unequal to one, but > the vectors still scale correctly (i.e., u and v have the same length, > even when x is twice y). > > Finally, I have always wanted an easy way to do curly vectors -- similar > to streaklines -- but this might be beyond the scope of the simple > quiver command. > > -Rob |