-
Notifications
You must be signed in to change notification settings - Fork 224
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
plot no longer accepts date/time data in pygmt 0.14 #3757
Comments
Hmm yes, I can reproduce this on PyGMT v0.14.0. We'll need to check what changes caused this regression. In the meantime, could you put your list of xdata = pd.DatetimeIndex(
data=[
pd.to_datetime("2024-12-01"),
pd.to_datetime("2024-12-15"),
pd.to_datetime("2024-12-31"),
pd.to_datetime("2025-01-15"),
pd.to_datetime("2025-02-01"),
]
)
ydata = [0.1, 0.2, 0.5, 0.7, 0.4]
fig = pygmt.Figure()
fig.basemap(
projection="X10cT/5c", region=["2024-12-01T", "2025-02-01T", 0, 1], frame=True
)
fig.plot(x=xdata, y=ydata, verbose=True)
fig.show() produces |
@eelcodoornbos Thanks for reporting this! I do not remember I saw this warning, when making two minor changes to this tutorial (https://github.com/GenericMappingTools/pygmt/pull/3664/files, December 2). |
So the Lines 942 to 947 in 2a84b5e
These lines were most recently changed in #3563, but I don't think the bug was caused by that PR, probably somewhere else when we were doing the refactoring. Using the @seisman, should we revise the logic in that |
Then, it's converted to pygmt/pygmt/clib/conversion.py Lines 197 to 200 in c7198e6
The fix should be easy and should be done in the Actually, I already had a branch I can submit a PR for this branch, but I feel it would be better to have PRs #3670, #3687 merged first to ensure that the |
The following script works in 0.13 (and before), but fails to plot anything in 0.14 with the message
pygmt-session [WARNING]: Unable to parse 5 longitude strings
:The text was updated successfully, but these errors were encountered: