---------- Forwarded message ---------- From: Jae-Joon Lee <lee.j.j...@gmail.com> Date: Mon, Sep 27, 2010 at 11:41 AM Subject: Re: [Matplotlib-users] Plotting Arrows To: Gus Ishere <gus.is.h...@gmail.com>
This turns out to be a bug. And I think fixed it with r8720 and r8721. Meanwhile, try to use other arrowstyles (e.g., "->") or other arrow commands. Also, the recommend way is to use "annotate" command. For example, ax.annotate("", (0, 0), (3,2), arrowprops=dict(arrowstyle="->")) Regards, -JJ On Sun, Sep 26, 2010 at 3:11 PM, Gus Ishere <gus.is.h...@gmail.com> wrote: > 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 <module> > ax.add_patch(arr) > File "C:\Python26\lib\site-packages\matplotlib\axes.py", line 1453, in > add_patch > self._update_patch_limits(p) > 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 > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users