Skip to content

Mouse-over in DataFrame plot shows wrong dates #7443

Closed
@Poquaruse

Description

@Poquaruse

In a new IPython Notebook session:

import pandas as pd
import numpy as np
%matplotlib
dt_rng = pd.date_range(start='2014-01-01', end='2014-01-31', freq='1min')
df = pd.DataFrame(np.random.randn(len(dt_rng)), index=dt_rng)
ax = df.plot()

The DataFrame is plotted correctly. However, a mouse-over shows wrong dates starting in the year 1970. The axis-labelling is correct.

Editing the format_coord function shows something interesting:

ax.format_coord = lambda x,y: "{} {}".format(x,y)

231422240.[....] and so on. This float value obviously isn't parsed correctly. Any ideas?

Thanks for making pandas so great and best regards!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions