Skip to content

May a bug of Series.plot in pandas 0.17? #11529

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
Eastsun opened this issue Nov 6, 2015 · 1 comment
Closed

May a bug of Series.plot in pandas 0.17? #11529

Eastsun opened this issue Nov 6, 2015 · 1 comment
Labels
Bug Regression Functionality that used to work in a prior pandas version Visualization plotting
Milestone

Comments

@Eastsun
Copy link

Eastsun commented Nov 6, 2015

The origin post with pictures is on: http://stackoverflow.com/questions/33559772/is-this-a-bug-of-series-plot-in-pandas-0-17

I always use ser.plot(xticks=range(0, len(ser), step), ..) to plot figures with specified xticks. But it doesn't work anymore in pandas 0.17 when the Series with labels. Here are the codes:

In [1]: from numpy import random as rnd 
In [2]: import pandas as pd
In [3]: pd.__version__
Out[3]: '0.17.0'
In [4]: %matplotlib inline
In [5]: rnd.seed(123)
In [6]: ser = pd.Series(rnd.randn(73).cumsum(), index=['P%02d' % i for i in range(73)])
In [7]: ser.plot(figsize=(9, 6), rot=60, title='Figure without xticks')
Out[7]: <matplotlib.axes._subplots.AxesSubplot at 0x8370198
In [8]: ser.plot(figsize=(9, 6), xticks=list(range(0, 73, 6)), rot=60, title='Figure with xticks')
Out[8]: <matplotlib.axes._subplots.AxesSubplot at 0x83e9940>

image
image

The figure with xticks specified doesn't display xticklabes correctly.

@jorisvandenbossche
Copy link
Member

Yes, thanks for reporting! This is a regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Regression Functionality that used to work in a prior pandas version Visualization plotting
Projects
None yet
Development

No branches or pull requests

2 participants