Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'pivot' property not recognised in quiver #3907

Closed
szymk opened this issue Dec 11, 2014 · 4 comments
Closed

'pivot' property not recognised in quiver #3907

szymk opened this issue Dec 11, 2014 · 4 comments
Milestone

Comments

@szymk
Copy link

szymk commented Dec 11, 2014

When I try to set the 'pivot' kw argument to any value, the result is:

Traceback (most recent call last):
  File "plotInpTrajOut_LocBag.py", line 265, in <module>
    ax.quiver(x,y,z,u,v,w,length=0.2,color=colors[guid_nb],pivot='tail')
  File "/usr/lib/python2.7/dist-packages/mpl_toolkits/mplot3d/axes3d.py", line 2614, in quiver
    linec = art3d.Line3DCollection(lines, *args[argi:], **kwargs)
  File "/usr/lib/python2.7/dist-packages/mpl_toolkits/mplot3d/art3d.py", line 171, in __init__
    LineCollection.__init__(self, segments, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/collections.py", line 1060, in __init__
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/collections.py", line 132, in __init__
    self.update(kwargs)
  File "/usr/lib/python2.7/dist-packages/matplotlib/artist.py", line 757, in update
    raise AttributeError('Unknown property %s' % k)
AttributeError: Unknown property pivot

I'm using matplotlib 1.4.2-3 under debian
BTW, it seems to me that the documentation on possible 'pivot' values is not consistent.

Hope it helps!

@tacaswell
Copy link
Member

It looks like you are using the 3D version of quiver which I think only just got support for the pivot kwarg #3735. That code is on master, but won't be back-ported to the 1.4.x branch.

@tacaswell tacaswell added this to the unassigned milestone Dec 11, 2014
@tacaswell tacaswell added the status: needs clarification Issues that need more information to resolve. label Dec 11, 2014
@szymk
Copy link
Author

szymk commented Dec 23, 2014

Yes, you're right, I was using quiver in 3D. I'll follow the development
and switch to the new code when available. Thanks for your answer!

Best regards,

Szymon

On 11 December 2014 at 18:53, Thomas A Caswell notifications@github.com
wrote:

It looks like you are using the 3D version of quiver which I think only
just got support for the pivot kwarg #3735
#3735. That code is on
master, but won't be back-ported to the 1.4.x branch.


Reply to this email directly or view it on GitHub
#3907 (comment)
.

Szymon Krupinski
szymk1@gmail.com

@efiring
Copy link
Member

efiring commented Dec 24, 2014

The documentation inconsistency you note is that "mid" is an alternative to "middle".

@efiring efiring added Documentation and removed status: needs clarification Issues that need more information to resolve. labels Dec 24, 2014
@tacaswell tacaswell modified the milestones: v1.4.3, unassigned Dec 24, 2014
@tacaswell
Copy link
Member

Not sure what we want to do about this, from looking at the code tip.* -> 'tip', 'mid.*' -> 'middle' and anything else results in tail.

ex

X, Y = np.meshgrid(np.linspace(-np.pi, np.pi, 16), np.linspace(-np.pi, np.pi, 16))
v = np.sin(X)
u = np.cos(Y)
plt.quiver(X, Y, u, v)
plt.quiver(X, Y, u, v, color='b', pivot='ardvaark', alpha=.5)

Results in no error and blue arrows overlaid on the black:

so

@efiring I am going to close this issue and make a new one for improving the validation on quiver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants