Revision: 5000
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5000&view=rev
Author:   mdboom
Date:     2008-03-11 05:07:10 -0700 (Tue, 11 Mar 2008)

Log Message:
-----------
Fixing Arrow patch (as submitted by Michael Fitzgerald)

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/patches.py

Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py  2008-03-10 15:18:49 UTC (rev 
4999)
+++ trunk/matplotlib/lib/matplotlib/patches.py  2008-03-11 12:07:10 UTC (rev 
5000)
@@ -608,7 +608,7 @@
         return self._patch_transform
 
 # COVERAGE NOTE: Not used internally or from examples
-class Arrow(Polygon):
+class Arrow(Patch):
     """
     An arrow patch
     """
@@ -628,13 +628,14 @@
         Valid kwargs are:
         %(Patch)s
         """
+        Patch.__init__(self, **kwargs)
         L = npy.sqrt(dx**2+dy**2) or 1 # account for div by zero
         cx = float(dx)/L
         sx = float(dy)/L
 
         trans1 = transforms.Affine2D().scale(L, width)
         trans2 = transforms.Affine2D.from_values(cx, sx, -sx, cx, 0.0, 0.0)
-        trans3 = transforms.Affine2d().translate(x, y)
+        trans3 = transforms.Affine2D().translate(x, y)
         trans = trans1 + trans2 + trans3
         self._patch_transform = trans.frozen()
     __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd


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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to