Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Linewidth(s) keywords not working with quiver #8630

Closed
@Silmathoron

Description

@Silmathoron

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp