Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6e74e7d

Browse filesBrowse files
committed
DOC: sync order of axes.pie args to call sig
1 parent 1de59f4 commit 6e74e7d
Copy full SHA for 6e74e7d

File tree

Expand file treeCollapse file tree

1 file changed

+30
-32
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+30
-32
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+30-32Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2478,73 +2478,73 @@ def pie(self, x, explode=None, labels=None, colors=None,
24782478
r"""Plot a pie chart.
24792479
24802480
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.
24852485
24862486
Parameters
24872487
----------
2488-
x : array
2488+
x : array-like
24892489
The input array used to make the pie chart.
24902490
2491-
explode : None or array
2491+
explode : array-like, optional (default is None)
24922492
If not *None*, is a ``len(x)`` array which specifies the
24932493
fraction of the radius with which to offset each wedge.
24942494
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)
24962499
A sequence of matplotlib color args through which the pie chart
24972500
will cycle. If `None`, will use the colors in the currently
24982501
active cycle.
24992502
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
25042504
If not *None*, is a string or function used to label the wedges
25052505
with their numeric value. The label will be placed inside the
25062506
wedge. If it is a format string, the label will be ``fmt%pct``.
25072507
If it is a function, it will be called.
25082508
2509-
pctdistance : float
2509+
pctdistance : float, optional (default is 0.6)
25102510
The ratio between the center of each pie slice and the
25112511
start of the text generated by *autopct*. Ignored if
25122512
*autopct* is *None*; default is 0.6.
25132513
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)
25182515
Draw a shadow beneath the pie.
25192516
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)
25212521
If not *None*, rotates the start of the pie chart by *angle*
25222522
degrees counterclockwise from the x-axis.
25232523
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.
25262526
2527-
counterclock : bool
2527+
counterclock : bool, optional (default is True)
25282528
Specify fractions direction, clockwise or counterclockwise.
25292529
2530-
wedgeprops : None or dict
2530+
wedgeprops : dict, optional (default is None)
25312531
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}``
25332533
to set the width of the wedge border lines equal to 3.
25342534
For more details, look at the doc/arguments of the wedge object.
2535-
By default `clip_on=False`.
2535+
By default ``clip_on=False``.
25362536
2537-
textprops : None or dict
2537+
textprops : dict, optional (default is None)
25382538
Dict of arguments to pass to the text objects.
25392539
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.
25432543
2544-
frame : bool
2544+
frame : bool, optional (default is False)
25452545
Plot axes frame with the chart if true.
25462546
2547-
rotatelabels : bool
2547+
rotatelabels : bool, optional (default is False)
25482548
Rotate each label to the angle of the corresponding slice if true.
25492549
25502550
Returns
@@ -2565,10 +2565,8 @@ def pie(self, x, explode=None, labels=None, colors=None,
25652565
The pie chart will probably look best if the figure and axes are
25662566
square, or the Axes aspect is equal.
25672567
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
25702569
2571-
>>> axes(aspect=1)
25722570
25732571
"""
25742572

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.