From: <md...@us...> - 2008-06-13 12:46:31
|
Revision: 5502 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5502&view=rev Author: mdboom Date: 2008-06-13 05:46:20 -0700 (Fri, 13 Jun 2008) Log Message: ----------- Correct label location in pie chart. Thanks Benoit Hirbec! Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2008-06-13 12:20:35 UTC (rev 5501) +++ trunk/matplotlib/CHANGELOG 2008-06-13 12:46:20 UTC (rev 5502) @@ -1,3 +1,6 @@ +2008-06-13 Change pie chart label alignment to avoid having labels + overwrite the pie - MGD + 2008-06-12 Added some helper functions to the mathtext parser to return bitmap arrays or write pngs to make it easier to use mathtext outside the context of an mpl figure. modified Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2008-06-13 12:20:35 UTC (rev 5501) +++ trunk/matplotlib/lib/matplotlib/axes.py 2008-06-13 12:46:20 UTC (rev 5502) @@ -3953,10 +3953,11 @@ xt = x + labeldistance*radius*math.cos(thetam) yt = y + labeldistance*radius*math.sin(thetam) + label_alignment = xt > 0 and 'left' or 'right' t = self.text(xt, yt, label, size=rcParams['xtick.labelsize'], - horizontalalignment='center', + horizontalalignment=label_alignment, verticalalignment='center') texts.append(t) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |