html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue
https://github.com/pydata/xarray/issues/4378#issuecomment-681068503,https://api.github.com/repos/pydata/xarray/issues/4378,681068503,MDEyOklzc3VlQ29tbWVudDY4MTA2ODUwMw==,10194086,2020-08-26T19:08:09Z,2020-08-26T19:08:09Z,MEMBER,"Quickly looking at the code this error message seems to not be entirely correct. That should probably be along the lines of
```diff
TypeError: Plotting requires coordinates to be numeric or dates of type
np.datetime64, datetime.datetime, cftime.datetime
- or pd.Interval.
+ or pd.Interval containing one of these dtypes.
```
The `pd.Interval` are used to calculate their midpoints. Then the dtype of the midpoints is checked:
https://github.com/pydata/xarray/blob/9c85dd5f792805bea319f01f08ee51b83bde0f3b/xarray/plot/utils.py#L578
But indeed matplotlib does not seem to be able to directly plot `pd.Timedelta`s
```python
x = [d-pd.Timestamp(""2000-01-01"") for d in pd.date_range(""2000-01-01"", ""2000-01-02"", 10)]
plt.plot(x, np.arange(10))
TypeError: ...
```
So I am not sure we should try to be clever here.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,686461572