@@ -5005,13 +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 ):
5008+ labeldistance = 1.1 , startangle = 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, shadow=False)
5014+ autopct=None, pctdistance=0.6, labeldistance=1.1,
5015+ shadow=False, startangle=None)
50155016
50165017 Make a pie chart of array *x*. The fractional area of each
50175018 wedge is given by x/sum(x). If sum(x) <= 1, then the values
@@ -5048,6 +5049,10 @@ def pie(self, x, explode=None, labels=None, colors=None,
50485049 *shadow*: [ *False* | *True* ]
50495050 Draw a shadow beneath the pie.
50505051
5052+ *startangle*: [ *None* | Offset angle ]
5053+ If not *None*, rotates the start of the pie chart by *angle*
5054+ degrees.
5055+
50515056 The pie chart will probably look best if the figure and axes are
50525057 square. Eg.::
50535058
@@ -5085,8 +5090,14 @@ def pie(self, x, explode=None, labels=None, colors=None,
50855090
50865091 center = 0 ,0
50875092 radius = 1
5088- theta1 = 0
50895093 i = 0
5094+
5095+ # Starting theta1 is the start fraction of the circle
5096+ if startangle is None :
5097+ theta1 = 0
5098+ else :
5099+ theta1 = startangle / 360.0
5100+
50905101 texts = []
50915102 slices = []
50925103 autotexts = []
0 commit comments