pydata/pandas — pull request #6976 by sinhrks (2014-04-27 00:22:28+00:00)
Title: ENH: support pie plot in series and dataframe plot

Related to #413, added pie plot for `Series.plot` and `DataFrame.plot` kind.

If data includes ``NaN``, it will be automatically filled by 0. If data contains negative value, ``ValueError`` will be raised.

```
import pandas as pd
import numpy as np
series = pd.Series(3 * np.random.rand(4), index=['a', 'b', 'c', 'd'], name='series')
series.plot(kind='pie')
```
![series_pie_plot](https://cloud.githubusercontent.com/assets/1696302/2810158/526e4f82-cda1-11e3-95b3-422d8e5b18ef.png)

### Plotting with DataFrame
Pie plot with ``DataFrame`` requires either to specify target column by ``y`` argument or ``subplots=True``. When ``y`` is specified, pie plot of selected column will be drawn. If ``subplots=True`` is specified, pie plots for each columns are drawn as subplots. Legend will be drawn in each pie plots by default, specify ``legend=False`` to hide it.

```
df = pd.DataFrame(3 * np.random.rand(4, 2), index=['a', 'b', 'c', 'd'], columns=['x', 'y'])
df.plot(kind='pie', subplots=True)
```
![df_pie_plot](https://cloud.githubusercontent.com/assets/1696302/2810159/5691fc76-cda1-11e3-9532-43a7ebafc3e5.png)

### Plotting with Options
You can use ``labels`` and ``colors`` keywords to specify labels and colors of each wedges (Cannot use ``label`` and ``color``, because of matplotlib's specification). If you want to hide wedge labels, specify ``labels=None``. If ``fontsize`` is specified, the value will be applied to wedge labels. Also, other keywords supported by ``matplotlib.pyplot.pie`` can be used.

```
series.plot(kind='pie', labels=['AA', 'BB', 'CC', 'DD'], colors=['r', 'g', 'b', 'c'],
autopct='%.2f', fontsize=20)
```
![series_pie_plot_options](https://cloud.githubusercontent.com/assets/1696302/2810160/5b5d8f72-cda1-11e3-87b0-de164b887c75.png)