Revision: 4199
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4199&view=rev
Author: mdboom
Date: 2007-11-09 13:27:30 -0800 (Fri, 09 Nov 2007)
Log Message:
-----------
Bugfix: [ 1732274 ] No antialiasing with pie on wxpython
Reducing the sampling of the curve on the wedge looks much better.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/patches.py
Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py 2007-11-09 21:09:04 UTC (rev
4198)
+++ trunk/matplotlib/lib/matplotlib/patches.py 2007-11-09 21:27:30 UTC (rev
4199)
@@ -511,7 +511,7 @@
def __str__(self):
return "Wedge(%g,%g)"%self.xy[0]
def __init__(self, center, r, theta1, theta2,
- dtheta=0.1, **kwargs):
+ dtheta=5.0, **kwargs):
"""
Draw a wedge centered at x,y tuple center with radius r that
sweeps theta1 to theta2 (angles)
@@ -523,7 +523,11 @@
"""
xc, yc = center
- rads = (math.pi/180.)*npy.arange(theta1, theta2+0.1*dtheta, dtheta)
+ theta1 = float(theta1)
+ theta2 = float(theta2)
+ dtheta = float(dtheta)
+ num_points = abs(theta2 - theta1) / dtheta
+ rads = (npy.pi/180.) * npy.linspace(theta1, theta2, num_points,
endpoint=True)
xs = r*npy.cos(rads)+xc
ys = r*npy.sin(rads)+yc
verts = [center]
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: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins