Skip to content
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

Range Limits for a Datetime Axis don't work with Datetime #3441

Closed
mgorfer opened this issue Jan 29, 2019 · 3 comments
Closed

Range Limits for a Datetime Axis don't work with Datetime #3441

mgorfer opened this issue Jan 29, 2019 · 3 comments
Milestone

Comments

@mgorfer
Copy link

mgorfer commented Jan 29, 2019

When setting the x-limits of my datetime axis with
xlim = (datetime.datetime(2002, 1, 1), datetime.datetime(2004, 1, 1)),
I get the error message
ValueError: xlim: tuple element is not numeric: 2002-01-01 00:00:00.
The x-axis data comes from xarray and has dtype='datetime64[ns]

My workaround for entering the x-limits is
xlim = (datetime.datetime(2002, 1, 1).timestamp() * 1000, datetime.datetime(2004, 1, 1).timestamp() * 1000)

@philippjfr
Copy link
Member

Should implement this in #3441 and also allow date strings at the same time.

@philippjfr philippjfr added this to the v1.11.3 milestone Jan 29, 2019
@philippjfr
Copy link
Member

I believe this was fixed in #3491

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants