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

Closed
Eastsun opened this Issue Nov 6, 2015 · 1 comment

Comments

Projects
None yet
2 participants

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.

Yes, thanks for reporting! This is a regression.

jorisvandenbossche added this to the 0.17.1 milestone Nov 6, 2015

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