@@ -2478,73 +2478,73 @@ def pie(self, x, explode=None, labels=None, colors=None,
2478
2478
r"""Plot a pie chart.
2479
2479
2480
2480
Make a pie chart of array *x*. The fractional area of each
2481
- wedge is given by x/sum(x). If sum(x) <= 1, then the values
2482
- of x give the fractional area directly and the array will not
2483
- be normalized. The wedges are plotted counterclockwise,
2484
- by default starting from the x-axis.
2481
+ wedge is given by `` x/sum(x)`` . If `` sum(x) <= 1`` , then the
2482
+ values of x give the fractional area directly and the array
2483
+ will not be normalized. The wedges are plotted
2484
+ counterclockwise, by default starting from the x-axis.
2485
2485
2486
2486
Parameters
2487
2487
----------
2488
- x : array
2488
+ x : array-like
2489
2489
The input array used to make the pie chart.
2490
2490
2491
- explode : None or array
2491
+ explode : array-like, optional (default is None)
2492
2492
If not *None*, is a ``len(x)`` array which specifies the
2493
2493
fraction of the radius with which to offset each wedge.
2494
2494
2495
- colors : None or array
2495
+ labels : list, optional (default is None)
2496
+ A sequence of strings providing the labels for each wedge
2497
+
2498
+ colors : array-like, optional (default is None)
2496
2499
A sequence of matplotlib color args through which the pie chart
2497
2500
will cycle. If `None`, will use the colors in the currently
2498
2501
active cycle.
2499
2502
2500
- labels : None or list
2501
- A sequence of strings providing the labels for each wedge
2502
-
2503
- autopct : None or string or function
2503
+ autopct : None (default), string, or function, optional
2504
2504
If not *None*, is a string or function used to label the wedges
2505
2505
with their numeric value. The label will be placed inside the
2506
2506
wedge. If it is a format string, the label will be ``fmt%pct``.
2507
2507
If it is a function, it will be called.
2508
2508
2509
- pctdistance : float
2509
+ pctdistance : float, optional (default is 0.6)
2510
2510
The ratio between the center of each pie slice and the
2511
2511
start of the text generated by *autopct*. Ignored if
2512
2512
*autopct* is *None*; default is 0.6.
2513
2513
2514
- labeldistance : float
2515
- The radial distance at which the pie labels are drawn
2516
-
2517
- shadow : bool
2514
+ shadow : bool, optional (default is False)
2518
2515
Draw a shadow beneath the pie.
2519
2516
2520
- startangle : None or float
2517
+ labeldistance : float, optional (default is 1.1)
2518
+ The radial distance at which the pie labels are drawn
2519
+
2520
+ startangle : float, optional (default is None)
2521
2521
If not *None*, rotates the start of the pie chart by *angle*
2522
2522
degrees counterclockwise from the x-axis.
2523
2523
2524
- radius : None or float
2525
- The radius of the pie, if *radius* is *None* it will be set to 1.
2524
+ radius : float, optional (default is None)
2525
+ The radius of the pie, if *radius* is *None* it will be set to 1.
2526
2526
2527
- counterclock : bool
2527
+ counterclock : bool, optional (default is True)
2528
2528
Specify fractions direction, clockwise or counterclockwise.
2529
2529
2530
- wedgeprops : None or dict
2530
+ wedgeprops : dict, optional (default is None)
2531
2531
Dict of arguments passed to the wedge objects making the pie.
2532
- For example, you can pass in wedgeprops = { 'linewidth' : 3 }
2532
+ For example, you can pass in`` wedgeprops = {'linewidth': 3}``
2533
2533
to set the width of the wedge border lines equal to 3.
2534
2534
For more details, look at the doc/arguments of the wedge object.
2535
- By default `clip_on=False`.
2535
+ By default `` clip_on=False` `.
2536
2536
2537
- textprops : None or dict
2537
+ textprops : dict, optional (default is None)
2538
2538
Dict of arguments to pass to the text objects.
2539
2539
2540
- center : list of float
2541
- Center position of the chart. Takes value (0,0) or is a sequence
2542
- of 2 scalars.
2540
+ center : list of float, optional (default is (0, 0))
2541
+ Center position of the chart. Takes value (0, 0) or is a
2542
+ sequence of 2 scalars.
2543
2543
2544
- frame : bool
2544
+ frame : bool, optional (default is False)
2545
2545
Plot axes frame with the chart if true.
2546
2546
2547
- rotatelabels : bool
2547
+ rotatelabels : bool, optional (default is False)
2548
2548
Rotate each label to the angle of the corresponding slice if true.
2549
2549
2550
2550
Returns
@@ -2565,10 +2565,8 @@ def pie(self, x, explode=None, labels=None, colors=None,
2565
2565
The pie chart will probably look best if the figure and axes are
2566
2566
square, or the Axes aspect is equal.
2567
2567
2568
- >>> figure(figsize=(8,8))
2569
- >>> ax = axes([0.1, 0.1, 0.8, 0.8])
2568
+ .. plot:: mpl_examples/pie_and_polar_charts/pie_demo_features.py
2570
2569
2571
- >>> axes(aspect=1)
2572
2570
2573
2571
"""
2574
2572
0 commit comments