Skip to content

Conversation

onesandzeroes
Copy link
Contributor

Fixes #8558. As far as I can tell the two plot types where this applies are line and bar plots, if there any others they should also be easy to fix. Bar and line plots no longer include the index name:

import pandas as pd
from pandas import Series
import matplotlib.pyplot as plt

s = Series([1, 2, 3], index=['a', 'b', 'c'])
s.index.name = 'The Index'

ax = s.plot(use_index=False)
plt.show()


image

ax2 = s.plot(kind='bar', use_index=False)
plt.show()

image

@jreback jreback added the Visualization plotting label Nov 14, 2014
@jreback jreback added this to the 0.15.2 milestone Nov 14, 2014
@jreback
Copy link
Contributor

jreback commented Nov 14, 2014

@TomAugspurger ?

@TomAugspurger
Copy link
Contributor

Great, thanks @onesandzeroes . FYI there's also AreaPlot but your fix catches it through LinePlot.

Mind rebasing, and I'll merge?

@onesandzeroes
Copy link
Contributor Author

@TomAugspurger I rebased but got a build error (looks like Travis was having connection issues), not sure how to force a recheck.

Add test case

Add check for use_index before setting label

Add to release notes

Add test case for barplot

Add checks for use_index in bar plot

Missed merge conflict marker
@onesandzeroes
Copy link
Contributor Author

nvm, had to fix up something anyway so it's rebuilding now.

TomAugspurger pushed a commit that referenced this pull request Nov 16, 2014
VIS: plot with `use_index=False` shouldn't plot the index name
@TomAugspurger TomAugspurger merged commit f2f88c6 into pandas-dev:master Nov 16, 2014
@TomAugspurger
Copy link
Contributor

Thanks. I think there's a button in the Travis GUI to force a rebuild FYI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VIS: plot with use_index=False shouldn't plot the index name

3 participants