Skip to content

Using Pandas 0.21 auto-detection of dates fails in pyplot #18192

Closed
@guivo

Description

@guivo

Using the following code

plt.plot(pd.to_datetime(np.linspace(1501288700, 1501290000, 10), unit='s'), np.arange(10))
plt.show()

I obtain different result using 0.20 or 0.21.

Using the code above with Pandas 0.20 the plot automatically identifies that the X axes contains dates. While using pandas 0.21 this, or other attempts, to force the X axes to show dates in the axes. The two plots have been attached and as you can notice one has show the datetiem as "%d %H:%M", as expected, while the 2nd made with the latest package shows integers.

All the other packages are unchanged.

pandas20
pandas21

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