Sébastien Labbé wrote:
> Bonjour,
> 
> This week, I was drawing plot vector field using two ways : (1) 
> plot_vector_field and (2) by simply suming up plenty of arrows as I 
> wished. Since their was a fixed point somewhere, I came up with the 
> problem of drawing a zero length arrow. Using sage 3.1.4, I get a zero 
> division error. Where is this division from? The example below show that 
> it is not from the slope as it can draw a vertical arrow.
> 
> sage: arrow((1, 1), (2, 1))
> sage: arrow((1, 1), (1, 2))
> sage: arrow((1, 1), (1, 1))
> ---------------------------------------------------------------------------
> ZeroDivisionError                         Traceback (most recent call 
> last) :
> ...
> /home/slabbe/sage/local/lib/python2.5/site-packages/matplotlib/arrow_line.pyc 
> in draw(self, renderer)
>     100         pixel_vector = (orig_t.transform_point(points[1]) - 
> orig_t.transform_point(points[0]))
>     101         pixel_length=math.sqrt(sum(pixel_vector**2))
> --> 102         clip_fraction = 
> renderer.points_to_pixels(self._arrowshorten)/pixel_length
>     103         head_clip_fraction = 
> renderer.points_to_pixels(self._arrowshorten+self._arrowheadlength*0.8)/pixel_length
>     104
> 
> ZeroDivisionError: float division
> 

This appears to be a bug.  We are tracking it here: 
http://trac.sagemath.org/sage_trac/ticket/4465

We should have it fixed shortly.  Thanks for reporting this!

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to