|
From: Benjamin R. <ben...@ou...> - 2013-08-16 02:27:11
|
On Aug 15, 2013 3:07 PM, "vwf" <vw...@vu...> wrote: > > After some struggling I got my first plots with quiver working. > A simple plot is very simple, but a complicated one is very different. > Right now I have a 80x80 grid with multiple plots and I plan to go up. > For this I need full control of the arrow dimensions. > > The only way I can get narrow arrow is by setting width: > plt.quiver(x,y,u,v, width=0.001, headwidth=3, scale=0.07,... > works fine for me. But I would like to set the linewidth per arrow. > > On stackoverflow I found: > widths = np.linspace(0, 2, X.size) > plt.quiver(X, Y, cos(deg), sin(deg), linewidths=widths) > > This did not work for me: the minimum width was too large. > I there a way to create narrow arrows with varying width? > The point of the example was to show that one can assign an array of widths to a quiver plot. The array can have whatever values you want. Note that there is likely a subtle difference between "width" and "linewidth" as keyword arguments that you might want to experiment with. Cheers! Ben Root |