Bug in Fancyarrow

Hi,
I figured out a bug in the FancyArrow class (sorry, I didn't track it down, yet). Might be related to my strange axes limits ?

Please have a look at the attached example. As you can see, in the lower panel the head is not rendered correctly.

I used the lates svn, revision 4730.

Manuel

BTW: When building matplotlib I get a lot of warnings:
[.....]
src/image.cpp: In member function �Py::Object Image::buffer_rgba(const Py::Tuple&)�:
src/image.cpp:266: warning: deprecated conversion from string constant to �char*�
[.....]

fancyarrowbug.py (381 Bytes)

fancyarrowbug.png

Manuel Metz wrote:

Hi,
I figured out a bug in the FancyArrow class (sorry, I didn't track it down, yet). Might be related to my strange axes limits ?

Please have a look at the attached example. As you can see, in the lower panel the head is not rendered correctly.

It appears to be stretching the arrow to fit in the rectangle defined by its points. Doesn't seem to be the right transformation. However, it looks as if it's been that way for a long time. Was this working for you at one time and then it broke, or is this your first attempt with FancyArrow? None of the matplotlib examples use FancyArrow. Maybe it's deprecated...?

BTW: When building matplotlib I get a lot of warnings:
[.....]
src/image.cpp: In member function �Py::Object Image::buffer_rgba(const Py::Tuple&)�:
src/image.cpp:266: warning: deprecated conversion from string constant to �char*�
[.....]

If you're using Python < 2.5 in conjunction with a recent gcc, that would be expected, but most likely benign. Python 2.5 changed the type of those arguments to "const char *" to avoid this warning.

Cheers,
Mike

···

--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Michael Droettboom wrote:

Manuel Metz wrote:

Hi,
I figured out a bug in the FancyArrow class (sorry, I didn't track it down, yet). Might be related to my strange axes limits ?

Please have a look at the attached example. As you can see, in the lower panel the head is not rendered correctly.

It appears to be stretching the arrow to fit in the rectangle defined by its points. Doesn't seem to be the right transformation. However, it looks as if it's been that way for a long time. Was this working for you at one time and then it broke, or is this your first attempt with FancyArrow? None of the matplotlib examples use FancyArrow. Maybe it's deprecated...?

No, it did not work before. I first wanted to use pylab.arrow, but then the head of the arrow was very, very long streched -> so I switched to FancyArrow, because it allowed me to draw a "nice & normal" arrow-head -- until I decided to not draw it parallel to the coordinate axis :frowning:

BTW: When building matplotlib I get a lot of warnings:
[.....]
src/image.cpp: In member function �Py::Object Image::buffer_rgba(const Py::Tuple&)�:
src/image.cpp:266: warning: deprecated conversion from string constant to �char*�
[.....]

If you're using Python < 2.5 in conjunction with a recent gcc, that would be expected, but most likely benign. Python 2.5 changed the type of those arguments to "const char *" to avoid this warning.

Ah, I see - thanks for the info.

Cheers,
   Manuel