@@ -3133,19 +3133,51 @@ def area(self, x=None, y=None, **kwds):
3133
3133
3134
3134
def pie (self , y = None , ** kwds ):
3135
3135
"""
3136
- Pie chart
3136
+ Generate a pie plot.
3137
+
3138
+ A pie plot is a proportional representation of the numerical data in a
3139
+ column. This function wraps :meth:`matplotlib.pyplot.pie` for the
3140
+ specified column. If no column reference is passed and
3141
+ ``subplots=True`` a pie plot is drawn for each numerical column
3142
+ independently.
3137
3143
3138
3144
Parameters
3139
3145
----------
3140
- y : label or position , optional
3141
- Column to plot.
3142
- `**kwds` : optional
3143
- Additional keyword arguments are documented in
3144
- :meth:`pandas.DataFrame.plot`.
3146
+ y : int or label , optional
3147
+ Label or position of the column to plot.
3148
+ If not provided, ``subplots=True`` argument must be passed.
3149
+ **kwds
3150
+ Keyword arguments to pass on to :meth:`pandas.DataFrame.plot`.
3145
3151
3146
3152
Returns
3147
3153
-------
3148
- axes : :class:`matplotlib.axes.Axes` or numpy.ndarray of them
3154
+ axes : matplotlib.axes.Axes or np.ndarray of them.
3155
+ A NumPy array is returned when `subplots` is True.
3156
+
3157
+ See Also
3158
+ --------
3159
+ Series.plot.pie : Generate a pie plot for a Series.
3160
+ DataFrame.plot : Make plots of a DataFrame.
3161
+
3162
+ Examples
3163
+ --------
3164
+ In the example below we have a DataFrame with the information about
3165
+ planet's mass and radius. We pass the the 'mass' column to the
3166
+ pie function to get a pie plot.
3167
+
3168
+ .. plot::
3169
+ :context: close-figs
3170
+
3171
+ >>> df = pd.DataFrame({'mass': [0.330, 4.87 , 5.97],
3172
+ ... 'radius': [2439.7, 6051.8, 6378.1]},
3173
+ ... index=['Mercury', 'Venus', 'Earth'])
3174
+ >>> plot = df.plot.pie(y='mass', figsize=(5, 5))
3175
+
3176
+ .. plot::
3177
+ :context: close-figs
3178
+
3179
+ >>> plot = df.plot.pie(subplots=True, figsize=(6, 3))
3180
+
3149
3181
"""
3150
3182
return self (kind = 'pie' , y = y , ** kwds )
3151
3183
0 commit comments