Skip to content

plot no longer accepts date/time data in pygmt 0.14 #3757

@eelcodoornbos

Description

@eelcodoornbos

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:

import pygmt
import pandas as pd
xdata = [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)
fig.show()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions