@@ -2328,8 +2328,7 @@ def pie(self, x, explode=None, labels=None, colors=None,
23282328 colors=('b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'),
23292329 autopct=None, pctdistance=0.6, shadow=False,
23302330 labeldistance=1.1, startangle=None, radius=None,
2331- counterclock=True, wedgeprops=None, textprops=None,
2332- )
2331+ counterclock=True, wedgeprops=None, textprops=None)
23332332
23342333 Make a pie chart of array *x*. The fractional area of each
23352334 wedge is given by x/sum(x). If sum(x) <= 1, then the values
@@ -2382,10 +2381,12 @@ def pie(self, x, explode=None, labels=None, colors=None,
23822381 For example, you can pass in wedgeprops = { 'linewidth' : 3 }
23832382 to set the width of the wedge border lines equal to 3.
23842383 For more details, look at the doc/arguments of the wedge object.
2384+ By default `clip_on=False`.
23852385
23862386 *textprops*: [ *None* | dict of key value pairs ]
23872387 Dict of arguments to pass to the text objects.
23882388
2389+
23892390 The pie chart will probably look best if the figure and axes are
23902391 square, or the Axes aspect is equal. e.g.::
23912392
@@ -2438,10 +2439,16 @@ def pie(self, x, explode=None, labels=None, colors=None,
24382439 else :
24392440 theta1 = startangle / 360.0
24402441
2442+ # set default values in wedge_prop
24412443 if wedgeprops is None :
24422444 wedgeprops = {}
2445+ if 'clip_on' not in wedgeprops :
2446+ wedgeprops ['clip_on' ] = False
2447+
24432448 if textprops is None :
24442449 textprops = {}
2450+ if 'clip_on' not in textprops :
2451+ textprops ['clip_on' ] = False
24452452
24462453 texts = []
24472454 slices = []
@@ -2467,10 +2474,7 @@ def pie(self, x, explode=None, labels=None, colors=None,
24672474 # make sure to add a shadow after the call to
24682475 # add_patch so the figure and transform props will be
24692476 # set
2470- shad = mpatches .Shadow (
2471- w , - 0.02 , - 0.02 ,
2472- #props={'facecolor':w.get_facecolor()}
2473- )
2477+ shad = mpatches .Shadow (w , - 0.02 , - 0.02 )
24742478 shad .set_zorder (0.9 * w .get_zorder ())
24752479 shad .set_label ('_nolegend_' )
24762480 self .add_patch (shad )
0 commit comments