Skip to content

DOC: Clean up the pie docstring PR #8371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 25, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
DOC: use colons for Axes.pie defaults, etc.
  • Loading branch information
phobson committed Mar 24, 2017
commit abff9fff55fa94c6b16c5d17de35907f83644ec9
39 changes: 20 additions & 19 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2475,7 +2475,8 @@ def pie(self, x, explode=None, labels=None, colors=None,
startangle=None, radius=None, counterclock=True,
wedgeprops=None, textprops=None, center=(0, 0),
frame=False, rotatelabels=False):
r"""Plot a pie chart.
r"""
Plot a pie chart.

Make a pie chart of array *x*. The fractional area of each
wedge is given by ``x/sum(x)``. If ``sum(x) <= 1``, then the
Expand All @@ -2488,14 +2489,14 @@ def pie(self, x, explode=None, labels=None, colors=None,
x : array-like
The input array used to make the pie chart.

explode : array-like, optional (default is None)
explode : array-like, optional, default: None
If not *None*, is a ``len(x)`` array which specifies the
fraction of the radius with which to offset each wedge.

labels : list, optional (default is None)
labels : list, optional, default: None
A sequence of strings providing the labels for each wedge

colors : array-like, optional (default is None)
colors : array-like, optional, default: None
A sequence of matplotlib color args through which the pie chart
will cycle. If `None`, will use the colors in the currently
active cycle.
Expand All @@ -2506,45 +2507,45 @@ def pie(self, x, explode=None, labels=None, colors=None,
wedge. If it is a format string, the label will be ``fmt%pct``.
If it is a function, it will be called.

pctdistance : float, optional (default is 0.6)
pctdistance : float, optional, default: 0.6
The ratio between the center of each pie slice and the
start of the text generated by *autopct*. Ignored if
*autopct* is *None*; default is 0.6.
*autopct* is *None*.

shadow : bool, optional (default is False)
shadow : bool, optional, default: False
Draw a shadow beneath the pie.

labeldistance : float, optional (default is 1.1)
labeldistance : float, optional, default: 1.1
The radial distance at which the pie labels are drawn

startangle : float, optional (default is None)
startangle : float, optional, default: None
If not *None*, rotates the start of the pie chart by *angle*
degrees counterclockwise from the x-axis.

radius : float, optional (default is None)
radius : float, optional, default: None
The radius of the pie, if *radius* is *None* it will be set to 1.

counterclock : bool, optional (default is True)
counterclock : bool, optional, default: True
Specify fractions direction, clockwise or counterclockwise.

wedgeprops : dict, optional (default is None)
wedgeprops : dict, optional, default: None
Dict of arguments passed to the wedge objects making the pie.
For example, you can pass in``wedgeprops = {'linewidth': 3}``
to set the width of the wedge border lines equal to 3.
For more details, look at the doc/arguments of the wedge object.
By default ``clip_on=False``.

textprops : dict, optional (default is None)
textprops : dict, optional, default: None
Dict of arguments to pass to the text objects.

center : list of float, optional (default is (0, 0))
center : list of float, optional, default: (0, 0)
Center position of the chart. Takes value (0, 0) or is a
sequence of 2 scalars.

frame : bool, optional (default is False)
frame : bool, optional, default: False
Plot axes frame with the chart if true.

rotatelabels : bool, optional (default is False)
rotatelabels : bool, optional, default: False
Rotate each label to the angle of the corresponding slice if true.

Returns
Expand All @@ -2558,7 +2559,7 @@ def pie(self, x, explode=None, labels=None, colors=None,
autotexts : list
A is a list of :class:`~matplotlib.text.Text` instances for the
numeric labels. Is returned only if parameter *autopct* is
not *None*.
not *None*.

Notes
-----
Expand Down Expand Up @@ -2684,9 +2685,9 @@ def get_next_color():
self.set_frame_on(False)

self.set_xlim((-1.25 + center[0],
1.25 + center[0]))
1.25 + center[0]))
self.set_ylim((-1.25 + center[1],
1.25 + center[1]))
1.25 + center[1]))
self.set_xticks([])
self.set_yticks([])

Expand Down