Skip to content

Better default formatting of timedelta with plot method #4083

Closed
@ahuang11

Description

@ahuang11

Currently, it shows nanoseconds.

import xarray as xr
ds = xr.tutorial.open_dataset('air_temperature')
ds.coords['tau'] = ds['time'] - ds['time'][0]
ds.mean(['lat', 'lon'])['air'].swap_dims({'time': 'tau'}).plot()

image

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