@@ -5005,14 +5005,14 @@ def stem(self, x, y, linefmt='b-', markerfmt='bo', basefmt='r-',
50055005
50065006    def  pie (self , x , explode = None , labels = None , colors = None ,
50075007            autopct = None , pctdistance = 0.6 , shadow = False ,
5008-             labeldistance = 1.1 , startangle = None ):
5008+             labeldistance = 1.1 , startangle = None ,  radius = None ):
50095009        r""" 
50105010        Call signature:: 
50115011
50125012          pie(x, explode=None, labels=None, 
50135013              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) 
50165016
50175017        Make a pie chart of array *x*.  The fractional area of each 
50185018        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,
50545054            If not *None*, rotates the start of the pie chart by *angle* 
50555055            degrees counterclockwise from the x-axis. 
50565056
5057+           *radius*: [ *None* | scalar ] 
5058+           The radius of the pie, if *radius* is *None* it will be set to 1. 
5059+ 
50575060        The pie chart will probably look best if the figure and axes are 
50585061        square.  Eg.:: 
50595062
@@ -5090,8 +5093,8 @@ def pie(self, x, explode=None, labels=None, colors=None,
50905093
50915094
50925095        center  =  0 ,0 
5093-         radius  =   1 
5094-         i   =   0 
5096+         if   radius  is   None : 
5097+              radius   =   1 
50955098
50965099        # Starting theta1 is the start fraction of the circle 
50975100        if  startangle  is  None :
@@ -5102,6 +5105,8 @@ def pie(self, x, explode=None, labels=None, colors=None,
51025105        texts  =  []
51035106        slices  =  []
51045107        autotexts  =  []
5108+ 
5109+         i  =  0 
51055110        for  frac , label , expl  in  cbook .safezip (x ,labels , explode ):
51065111            x , y  =  center 
51075112            theta2  =  theta1  +  frac 
0 commit comments