matplotlib.axes.Axes.arrow not producing nice arrows

Hi,

I am trying to place some arrows using
http://matplotlib.sourceforge.net/api/axes_api.html?highlight=arrow#matplotlib.axes.Axes.arrow

And unfortunately the arrows are not nice (see attached screenshot). How
can the line end be changed to "round" as, for example, with plot. Or
anyone can give a solution?

For very small print this might be acceptable, but not if the
arrow/linewidth is larger.

matplotlib_arrow.jpg

I think that the code that generated the screenshot needs to be
posted; otherwise no one knows what is being attempted....

···

On Thu, Oct 27, 2011 at 10:50 AM, mogliii <mogliii@...361...> wrote:

Hi,

I am trying to place some arrows using
http://matplotlib.sourceforge.net/api/axes_api.html?highlight=arrow#matplotlib.axes.Axes.arrow

And unfortunately the arrows are not nice (see attached screenshot). How
can the line end be changed to "round" as, for example, with plot. Or
anyone can give a solution?

For very small print this might be acceptable, but not if the
arrow/linewidth is larger.

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@...3826... Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
Daniel Hyams
dhyams@...287...

This is the code
http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/arrow_demo.py

Its this example from the gallery page
http://matplotlib.sourceforge.net/examples/pylab_examples/arrow_demo.html

Basically I see the same artifacts in my own plots, using the following
command:
ax1.arrow(9.5,15,0,-9.6,head_width=0.45,head_length=3,fc='k', length_includes_head=True)

···

On 27/10/2011 15:56, Daniel Hyams wrote:

I think that the code that generated the screenshot needs to be
posted; otherwise no one knows what is being attempted....

On Thu, Oct 27, 2011 at 10:50 AM, mogliii <mogliii@...361...> wrote:

Hi,

I am trying to place some arrows using
http://matplotlib.sourceforge.net/api/axes_api.html?highlight=arrow#matplotlib.axes.Axes.arrow

And unfortunately the arrows are not nice (see attached screenshot). How
can the line end be changed to "round" as, for example, with plot. Or
anyone can give a solution?

For very small print this might be acceptable, but not if the
arrow/linewidth is larger.

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@...3826... Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

It looks like the polygons that make up the arrows were not being
closed correctly, so the PDF renderer was not joining the ends of
the stroke.

Can you confirm that this branch resolves your issue?

https://github.com/matplotlib/matplotlib/pull/559

Mike
···

http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/arrow_demo.pyhttp://matplotlib.sourceforge.net/examples/pylab_examples/arrow_demo.html<mogliii@…361…>http://matplotlib.sourceforge.net/api/axes_api.html?highlight=arrow#matplotlib.axes.Axes.arrowhttp://p.sf.net/sfu/cisco-dev2devMatplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-usershttp://p.sf.net/sfu/cisco-dev2devMatplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users

Thanks, that fixed it. Both for the example (see attachment) and for
my own document.

So this branch resolved the issue.

Moglliii

matplotlib_arrow2.jpg

···

http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/arrow_demo.pyhttp://matplotlib.sourceforge.net/examples/pylab_examples/arrow_demo.html<mogliii@…361…>http://matplotlib.sourceforge.net/api/axes_api.html?highlight=arrow#matplotlib.axes.Axes.arrowhttp://p.sf.net/sfu/cisco-dev2devMatplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-usershttp://p.sf.net/sfu/cisco-dev2devMatplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-usershttp://p.sf.net/sfu/cisco-dev2devMatplotlib-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/matplotlib-users