@@ -5005,14 +5005,14 @@ def stem(self, x, y, linefmt='b-', markerfmt='bo', basefmt='r-',
5005
5005
5006
5006
def pie (self , x , explode = None , labels = None , colors = None ,
5007
5007
autopct = None , pctdistance = 0.6 , shadow = False ,
5008
- labeldistance = 1.1 , startangle = None ):
5008
+ labeldistance = 1.1 , startangle = None , radius = None ):
5009
5009
r"""
5010
5010
Call signature::
5011
5011
5012
5012
pie(x, explode=None, labels=None,
5013
5013
colors=('b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'),
5014
- autopct=None, pctdistance=0.6, labeldistance=1.1 ,
5015
- shadow=False , startangle=None)
5014
+ autopct=None, pctdistance=0.6, shadow=False ,
5015
+ labeldistance=1.1 , startangle=None, radius =None)
5016
5016
5017
5017
Make a pie chart of array *x*. The fractional area of each
5018
5018
wedge is given by x/sum(x). If sum(x) <= 1, then the values
@@ -5054,6 +5054,9 @@ def pie(self, x, explode=None, labels=None, colors=None,
5054
5054
If not *None*, rotates the start of the pie chart by *angle*
5055
5055
degrees counterclockwise from the x-axis.
5056
5056
5057
+ *radius*: [ *None* | scalar ]
5058
+ The radius of the pie, if *radius* is *None* it will be set to 1.
5059
+
5057
5060
The pie chart will probably look best if the figure and axes are
5058
5061
square. Eg.::
5059
5062
@@ -5090,8 +5093,8 @@ def pie(self, x, explode=None, labels=None, colors=None,
5090
5093
5091
5094
5092
5095
center = 0 ,0
5093
- radius = 1
5094
- i = 0
5096
+ if radius is None :
5097
+ radius = 1
5095
5098
5096
5099
# Starting theta1 is the start fraction of the circle
5097
5100
if startangle is None :
@@ -5102,6 +5105,8 @@ def pie(self, x, explode=None, labels=None, colors=None,
5102
5105
texts = []
5103
5106
slices = []
5104
5107
autotexts = []
5108
+
5109
+ i = 0
5105
5110
for frac , label , expl in cbook .safezip (x ,labels , explode ):
5106
5111
x , y = center
5107
5112
theta2 = theta1 + frac
0 commit comments