Revision: 5787
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5787&view=rev
Author:   jdh2358
Date:     2008-07-18 14:46:32 +0000 (Fri, 18 Jul 2008)

Log Message:
-----------
added Tuukka's YAArrow fix for horiz and vertical lines

Modified Paths:
--------------
    branches/v0_91_maint/lib/matplotlib/patches.py

Modified: branches/v0_91_maint/lib/matplotlib/patches.py
===================================================================
--- branches/v0_91_maint/lib/matplotlib/patches.py      2008-07-18 08:43:03 UTC 
(rev 5786)
+++ branches/v0_91_maint/lib/matplotlib/patches.py      2008-07-18 14:46:32 UTC 
(rev 5787)
@@ -712,6 +712,12 @@
         and the distance from x2,y2 ot the returned points is k
         """
         x1,y1,x2,y2,k = map(float, (x1,y1,x2,y2,k))
+
+        if y2-y1 == 0:
+            return x2, y2+k, x2, y2-k
+        elif x2-x1 == 0:
+            return x2+k, y2, x2-k, y2
+
         m = (y2-y1)/(x2-x1)
         pm = -1./m
         a = 1


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to