pydata/pandas — pull request #8307 by TomAugspurger (2014-09-18 13:14:37+00:00)
Title: VIS: Hide labels for NaN/zeros in boxplt [WIP]

Closes: https://github.com/pydata/pandas/issues/8198#issuecomment-55369006

The idea is to hide the labels around the pie plot so they don't overlap w/ nonzero labels. The NaN/zero labels should still be visible in the legend to indicate that there's missing data.

NaNs in the top row of plots:
```
In [1]: df = pd.DataFrame(np.random.rand(4, 4))

In [2]: df2 = df.copy()

In [3]: for i in range(len(df)):
...: df.iloc[i, i] = np.nan
...:

In [4]: fig, axes = plt.subplots(figsize=(16, 8), nrows=2, ncols=4)

In [5]: df.plot(kind='pie', subplots=True, ax=axes.ravel()[:4])
In [6]: df2.plot(kind='pie', subplots=True, ax=axes.ravel()[4:])
```

![ex](https://cloud.githubusercontent.com/assets/1312546/4320249/881bf944-3f35-11e4-85c8-bb5c4d539435.png)

Right now, for **DataFrames only** the NaN/zero labels aren't being put in the legend (or they aren't showing up). Still need to figure out why. It works fine for Series:

```
In [8]: df[0].plot(kind='pie', figsize=(4,4), legend=True)
```

![ex2](https://cloud.githubusercontent.com/assets/1312546/4320269/b75df6ee-3f35-11e4-9774-50f8aed26594.png)