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

patches fails when data are array, not list #6111

Closed
cpbl opened this issue Mar 5, 2016 · 1 comment
Closed

patches fails when data are array, not list #6111

cpbl opened this issue Mar 5, 2016 · 1 comment

Comments

@cpbl
Copy link

cpbl commented Mar 5, 2016

Python 2.7.10, matplotlib 1.5.1, GNU/linux
Python from Ubuntu; matplotlib from pip --user

import pylab as plt
import numpy as np
x=np.arange(10,20)
y=np.arange(10,20)
plt.arrow(x,y,x+1,y*0)

Line 1170 in patches.py (if not length) fails in above if the distance+head_length is a numpy array rather than a list:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

@cpbl cpbl changed the title patches fails when data are array, not lis patches fails when data are array, not list Mar 5, 2016
@cpbl
Copy link
Author

cpbl commented Mar 5, 2016

This is misdiagnosed. For some reason arrow() will not draw more than one arrow at once, ie it will not accept arguments as vectors.

@cpbl cpbl closed this as completed Mar 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant