Unfortunately, this is something that I haven't considered when implementing the FancyArrowPatch. As you may know, FancyArrowPatch is a single patch object (at least viewed from outside), so you cannot have multiple linestyles that can be set by users.
So, one option is to change the implementation to use a hard-coded line style for arrow heads, but this is not straight forward in fact. Another option is to use custom path effects. Attached is a modified version of your script with this approach. Although this makes your code more complicated, this could be the most straight forward way. Regards, -JJ On Fri, Apr 13, 2012 at 10:30 AM, Jason Grout <jason-s...@creativetrax.com> wrote: > When the -|> style was added to FancyArrowPatch, the purpose was to add > an arrow style with a certain style shaft, but a solid head [1]. > However, since the given linestyle is used for the outline of the head, > we can have arrowheads that look very odd. Here is the example input > and output: > > http://aleph.sagemath.org/?q=0b7e7b41-e6cc-4cfe-b176-e42ece3565c9 > > from matplotlib.pyplot import figure, show > from matplotlib.patches import FancyArrowPatch > > fig = figure() > ax = fig.add_subplot(111,autoscale_on=False,) > p = FancyArrowPatch((0,0), (1,1), > arrowstyle='-|>,head_width=8,head_length=16',lw=3,fc='k',ec='k',linestyle='dashed') > ax.add_patch(p) > show() > > Is there an easy fix to make the arrowhead have a solid linestyle, even > if the shaft is dashed? Is this desirable to anyone else besides me? > > Thanks, > > Jason > > [1] http://sourceforge.net/mailarchive/message.php?msg_id=21133511 > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
fancy_arrow_linestyle.py
Description: Binary data
------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users