error with annotation arrows and panning

hello,
I'm writing a program where the user can create annotations while interactively zooming and panning the graph. I kept getting errors when my panning would for the arrows to point toward the right. you can recreate the error by going to the example 'annotation_demo.py' and try to make the arrow in Figure 1 point toward the right.

I looked in the source files and I think I've found the cause. A line in file patches.py, class YAArrow, function get_verts(self) needs to be changed from

r = math.sqrt((y2-y1)**2. + (x2-x1)*2.)

to

r = math.sqrt((y2-y1)**2. + (x2-x1)**2.)

This change seemed to fix the errors I was getting.

Boonth

Fixed in svn. Thanks for the report.

JDH

ยทยทยท

On 7/13/07, BOONTHANOME NOUANESENGSY <nouanesengsy.1@...540...> wrote:

r = math.sqrt((y2-y1)**2. + (x2-x1)**2.)

This change seemed to fix the errors I was getting