Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Description
Cannot set different arrow sizes using quiver
This seems to be a regression in the behaviour of the quiver function
According tothis SO post,quiver
used to accept alinewidths
array argument to set the arrow sizes; however, this is no longer true with 2.02 on Py2/3K.
Thelinewidth
item pops 5 times inquiver.py
though.
Code for reproduction
From theSO post, but the code (reported as working) does not work on my install.
importmatplotlib.pyplotaspltimportnumpyasnpsin=np.sincos=np.cos# http://stackoverflow.com/questions/6370742/#6372413xmax=4.0xmin=-xmaxD=20ymax=4.0ymin=-ymaxx=np.linspace(xmin,xmax,D)y=np.linspace(ymin,ymax,D)X,Y=np.meshgrid(x,y)# plots the vector field for Y'=Y**3-3*Y-Xdeg=np.arctan(Y**3-3*Y-X)widths=np.linspace(0,2,X.size)plt.quiver(X,Y,cos(deg),sin(deg),linewidths=widths)plt.show()
Actual outcome
Output is the same as that of the initialSO post where thelinewidths
keyword is not set.
Matplotlib version
- Operating System: Manjaro
- Matplotlib Version: 2.02
- Python Version: 2.7.13 & 3.6.1
- Jupyter Version (if applicable): /
- Other Libraries: numpy 1.12.1
Metadata
Metadata
Assignees
Labels
No labels