Skip to content

Inconsistent plotting of DateTimeIndex #17001

Open
@gliptak

Description

@gliptak

Code Sample, a copy-pastable example if possible

%matplotlib inline
import seaborn
import pandas as pd
import numpy as np
dates = pd.date_range('2016-01-01', '2016-12-31', freq='D')
s = pd.Series(np.random.uniform(size=366), index=dates)
s.plot(kind='line')

line

s.plot(kind='bar')

bar

Problem description

line and bar displays dates differently as per screenshots attached.

Expected Output

Both line and bar displaying dates the same (preferably the readable layout)

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 2.7.12.final.0 python-bits: 64 OS: Linux OS-release: 4.10.0-26-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None

pandas: 0.20.3
pytest: 3.1.2
pip: 9.0.1
setuptools: 36.0.1
Cython: None
numpy: 1.13.1
scipy: 0.19.0
xarray: None
IPython: 5.4.1
sphinx: None
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: 1.0.0
xlwt: None
xlsxwriter: None
lxml: None
bs4: 4.6.0
html5lib: 0.999999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: 0.5.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions