I’d like to plot some arrows. I can use the pyplot.arrow function but it does not give an arrow head. I am trying to use FancyArrow in the following way:
import matplotlib as mpl
import matplotlib.pyplot as plt
plt.figure(None)
ax = plt.gca()
arr = mpl.patches.FancyArrowPatch((0,0),(3,2),arrowstyle=‘simple’)
ax.add_patch(arr)
plt.show()
but I get “ValueError: Given lines do not intersect” in the bezier.py file. (Full traceback below)
Thanks for any hints!
Gus
Traceback (most recent call last):
File “M:\mypy\minimum.py”, line 8, in
ax.add_patch(arr)
File “C:\Python26\lib\site-packages\matplotlib\axes.py”, line 1453, in add_patch
self._update_patch_limits§
File “C:\Python26\lib\site-packages\matplotlib\axes.py”, line 1469, in _update_patch_limits
vertices = patch.get_path().vertices
File “C:\Python26\lib\site-packages\matplotlib\patches.py”, line 3792, in get_path
_path, fillable = self.get_path_in_displaycoord()
File “C:\Python26\lib\site-packages\matplotlib\patches.py”, line 3822, in get_path_in_displaycoord
self.get_mutation_aspect()
File “C:\Python26\lib\site-packages\matplotlib\patches.py”, line 2845, in call
return self.transmute(path, mutation_size, linewidth)
File “C:\Python26\lib\site-packages\matplotlib\patches.py”, line 3384, in transmute
tail_left, tail_right = get_parallels(arrow_out, tail_width/2.)
File “C:\Python26\lib\site-packages\matplotlib\bezier.py”, line 359, in get_parallels
c2x_left, c2y_left, cos_t2, sin_t2)
File “C:\Python26\lib\site-packages\matplotlib\bezier.py”, line 34, in get_intersection
raise ValueError(“Given lines do not intersect”)
ValueError: Given lines do not intersect