Revision: 4882
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4882&view=rev
Author:   mdboom
Date:     2008-01-21 11:03:48 -0800 (Mon, 21 Jan 2008)

Log Message:
-----------
Fix bug with pie chart slices less than 2.5 degrees.

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-01-21 18:32:57 UTC 
(rev 4881)
+++ branches/v0_91_maint/lib/matplotlib/patches.py      2008-01-21 19:03:48 UTC 
(rev 4882)
@@ -526,7 +526,9 @@
         theta1 = float(theta1)
         theta2 = float(theta2)
         dtheta = float(dtheta)
-        num_points = abs(theta2 - theta1) / dtheta
+        num_points = (abs(theta2 - theta1) / dtheta)
+        if num_points < 2.0:
+            num_points = 2.0
         rads = (npy.pi/180.) * npy.linspace(theta1, theta2, num_points, 
endpoint=True)
         xs = r*npy.cos(rads)+xc
         ys = r*npy.sin(rads)+yc


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