Skip to content

Plotting with timedelta64 axis #2898

Open
@kcajf

Description

@kcajf

Pandas plotting has nice handling of timedelta64 axes - xarray seems to just plot these as integer nanoseconds. Would be great to have this functionality in xarray:

data = xr.DataArray(np.random.random(100), coords=[('td', np.arange(np.timedelta64(0), np.timedelta64(10, 'h'), np.timedelta64(6, 'm')))])

data.plot.line(x='td')

plt.figure()

data.to_pandas().plot()

Screenshot from 2019-04-16 05-17-54

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions