Asheesh Laroia
Mon, 14 Aug 2006 20:57:43 -0700
On Mon, 14 Aug 2006, John Hunter wrote:
Hey Asheesh -- sorry we missed this the first time. I just tried to apply it but the patch didn't go through because of the dir naming conventions you are using on your system. Could you try to get an svn co, apply your patch, and then submit an 'svn diff' ?
That's attached. Also, try using "patch -p1" next time. (-;I license this under the same terms at matplotlib is currently publicly distributed.
-- Asheesh. -- Your boyfriend takes chocolate from strangers.
Index: lib/matplotlib/axes.py
===================================================================
--- lib/matplotlib/axes.py (revision 2688)
+++ lib/matplotlib/axes.py (working copy)
@@ -2662,12 +2662,13 @@
def pie(self, x, explode=None, labels=None,
colors=None,
autopct=None,
+ pctdistance=0.6,
shadow=False
):
"""
PIE(x, explode=None, labels=None,
colors=('b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'),
- autopct=None, shadow=False)
+ autopct=None, pctdistance=0.6, shadow=False)
Make a pie chart of array x. The fractional area of each wedge is
given by x/sum(x). If sum(x)<=1, then the values of x give the
@@ -2686,6 +2687,10 @@
the wedge. If it is a format string, the label will be fmt%pct.
If it is a function, it will be called
+ - pctdistance is the ratio between the center of each pie slice
+ and the start of the text generated by autopct. Ignored if autopct
+ is None; default is 0.6.
+
- shadow, if True, will draw a shadow beneath the pie.
The pie chart will probably look best if the figure and axes are
@@ -2760,8 +2765,8 @@
texts.append(t)
if autopct is not None:
- xt = x + 0.6*radius*math.cos(thetam)
- yt = y + 0.6*radius*math.sin(thetam)
+ xt = x + pctdistance*radius*math.cos(thetam)
+ yt = y + pctdistance*radius*math.sin(thetam)
if is_string_like(autopct):
s = autopct%(100.*frac)
elif callable(autopct):
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
- [matplotlib-devel] Patch to let specify pie chart text radius Asheesh Laroia
- Re: [matplotlib-devel] Patch to let specify pie chart text radius Asheesh Laroia
- Re: [matplotlib-devel] Patch to let specify pie chart text radius Darren Dale
- Re: [matplotlib-devel] Patch to let specify pie chart text radius John Hunter
Re: [matplotlib-devel] Patch to let specify pie chart text radius Asheesh Laroia