Skip to content

BUG/VIS: Pie Plot with subplots doesn't include NaNs in legend #8390

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

Closed
TomAugspurger opened this issue Sep 25, 2014 · 1 comment
Closed
Labels

Comments

@TomAugspurger
Copy link
Contributor

Followup to #8307

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

Right now, when subplots=True, the NaN/zero labels aren't being put in the legend (or they aren't showing up).

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

ex2

Not a huge priority, we'll see if anyone notices and wants to implement a fix. I think it would involve refactoring all our legend and ticklabels code to be subplot aware.

@TomAugspurger TomAugspurger changed the title BUG/VIS: Pie Plots doesn't include NaNs in legend BUG/VIS: Pie Plot with subplots doesn't include NaNs in legend Sep 25, 2014
@TomAugspurger TomAugspurger added the Visualization plotting label Sep 27, 2014
@TomAugspurger TomAugspurger added this to the Someday milestone Sep 27, 2014
@TomAugspurger
Copy link
Contributor Author

Not clear what needs to be done here.

@TomAugspurger TomAugspurger modified the milestones: Someday, No action Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant