@@ -2328,8 +2328,7 @@ def pie(self, x, explode=None, labels=None, colors=None,
2328
2328
colors=('b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'),
2329
2329
autopct=None, pctdistance=0.6, shadow=False,
2330
2330
labeldistance=1.1, startangle=None, radius=None,
2331
- counterclock=True, wedgeprops=None, textprops=None,
2332
- )
2331
+ counterclock=True, wedgeprops=None, textprops=None)
2333
2332
2334
2333
Make a pie chart of array *x*. The fractional area of each
2335
2334
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,
2382
2381
For example, you can pass in wedgeprops = { 'linewidth' : 3 }
2383
2382
to set the width of the wedge border lines equal to 3.
2384
2383
For more details, look at the doc/arguments of the wedge object.
2384
+ By default `clip_on=False`.
2385
2385
2386
2386
*textprops*: [ *None* | dict of key value pairs ]
2387
2387
Dict of arguments to pass to the text objects.
2388
2388
2389
+
2389
2390
The pie chart will probably look best if the figure and axes are
2390
2391
square, or the Axes aspect is equal. e.g.::
2391
2392
@@ -2438,10 +2439,16 @@ def pie(self, x, explode=None, labels=None, colors=None,
2438
2439
else :
2439
2440
theta1 = startangle / 360.0
2440
2441
2442
+ # set default values in wedge_prop
2441
2443
if wedgeprops is None :
2442
2444
wedgeprops = {}
2445
+ if 'clip_on' not in wedgeprops :
2446
+ wedgeprops ['clip_on' ] = False
2447
+
2443
2448
if textprops is None :
2444
2449
textprops = {}
2450
+ if 'clip_on' not in textprops :
2451
+ textprops ['clip_on' ] = False
2445
2452
2446
2453
texts = []
2447
2454
slices = []
@@ -2467,10 +2474,7 @@ def pie(self, x, explode=None, labels=None, colors=None,
2467
2474
# make sure to add a shadow after the call to
2468
2475
# add_patch so the figure and transform props will be
2469
2476
# 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 )
2474
2478
shad .set_zorder (0.9 * w .get_zorder ())
2475
2479
shad .set_label ('_nolegend_' )
2476
2480
self .add_patch (shad )
0 commit comments